Yuki Suga / RTnoV4

Dependencies:   EthernetInterface mbed-rtos

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers PortBase.h Source File

PortBase.h

00001 /*******************************************
00002  * PortBase.h
00003  * @author Yuki Suga
00004  * @copyright Yuki Suga (ysuga.net) Nov, 10th, 2010.
00005  * @license LGPLv3
00006  *****************************************/
00007 
00008 #ifndef PORT_BASE_HEADER_INCLUDED
00009 #define PORT_BASE_HEADER_INCLUDED
00010 
00011 #include <stdint.h>
00012 #include "BasicDataType.h"
00013 #include "PortBuffer.h"
00014 
00015 typedef struct _PortBase {
00016   unsigned char portBuffer;
00017   void* pData;
00018   char* pName;
00019   char typeCode;
00020   PortBuffer *pPortBuffer;
00021 } PortBase;
00022 
00023 PortBase* PortBase_create();
00024 void PortBase_init(PortBase* pPortBase, const char* name, char typeCode, PortBuffer* dataBuffer);
00025 void PortBase_destroy(PortBase* pPortBase);
00026 
00027 uint8_t PortBase_isSequence(PortBase* pPortBase);
00028 uint8_t PortBase_getLength(PortBase* pPortBase);
00029 void PortBase_setLength(PortBase* pPortBase, uint8_t length);
00030 PortBuffer* PortBase_getBuffer(PortBase* pPortBase);
00031 
00032 
00033 
00034 #endif