Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers EMACMemoryManager.h Source File

EMACMemoryManager.h

00001 /* Copyright (c) 2017 ARM Limited
00002  *
00003  * Licensed under the Apache License, Version 2.0 (the "License");
00004  * you may not use this file except in compliance with the License.
00005  * You may obtain a copy of the License at
00006  *
00007  *     http://www.apache.org/licenses/LICENSE-2.0
00008  *
00009  * Unless required by applicable law or agreed to in writing, software
00010  * distributed under the License is distributed on an "AS IS" BASIS,
00011  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00012  * See the License for the specific language governing permissions and
00013  * limitations under the License.
00014  */
00015 
00016 #ifndef EMAC_MEMORY_MANAGER_H
00017 #define EMAC_MEMORY_MANAGER_H
00018 
00019 /**
00020  * Emac interface memory manager
00021  *
00022  * This interface provides abstraction for memory modules used in different IP stacks (often to accommodate zero
00023  * copy). Emac interface is required to accept output packets and provide received data using this stack-
00024  * independent API. This header should be implemented for each IP stack, so that we keep emacs module independent.
00025  *
00026  * Emac memory interface uses memory buffer chains to store data. Data passed in either direction
00027  * may be either contiguous (a single-buffer chain), or may consist of multiple buffers.
00028  * Chaining of the buffers is made using singly-linked list. The Emac data-passing APIs do not specify
00029  * alignment or structure of the chain in either direction.
00030  *
00031  * Memory buffers can be allocated either from heap or from memory pools. Heap buffers are always contiguous.
00032  * Memory pool buffers may be either contiguous or chained depending on allocation size.
00033  *
00034  * On Emac interface buffer chain ownership is transferred. Emac must free buffer chain that it is given for
00035  * link output and the stack must free the buffer chain that it is given for link input.
00036  *
00037  */
00038 
00039 #include "nsapi.h"
00040 #include "NetStackMemoryManager.h"
00041 
00042 typedef void emac_mem_buf_t;          // Memory buffer
00043 
00044 class EMACMemoryManager : public NetStackMemoryManager {
00045 
00046 };
00047 
00048 #endif /* EMAC_MEMORY_MANAGER_H */