This is Webservice SDK for mbed. LPCXpresso1769/LPC1768/FRDM-K64F/LPC4088
Dependents: MbedFileServer_1768MiniDK2 RedWireBridge IssueDebug_gcc MiMicRemoteMCU-for-Mbed ... more
NyLPC_cMiMicIpUdpSocket.h
00001 /* 00002 * NyLPC_cUdpSocket.h 00003 * 00004 * Created on: 2013/05/20 00005 * Author: nyatla 00006 */ 00007 00008 #ifndef NYLPC_CMIMICIPUDPSOCKET_H_ 00009 #define NYLPC_CMIMICIPUDPSOCKET_H_ 00010 00011 #include "NyLPC_os.h" 00012 #include "../NyLPC_iUdpSocket.h" 00013 00014 00015 #ifdef __cplusplus 00016 extern "C" { 00017 #endif /* __cplusplus */ 00018 00019 #define NyLPC_TcMiMicIpUdpSocket_MAX_UDP_SOCKET 1 00020 00021 /** 00022 * Class struct 00023 */ 00024 typedef struct NyLPC_TcMiMicIpUdpSocket NyLPC_TcMiMicIpUdpSocket_t; 00025 00026 00027 00028 /** 00029 * Representation of a uIP UDP connection. 00030 */ 00031 struct uip_udp_conn{ 00032 struct NyLPC_TIPv4Addr lipaddr; /**< The IP address of the remote peer. */ 00033 /** マルチキャスとアドレス(ZEROで無効)*/ 00034 struct NyLPC_TIPv4Addr mcastaddr; 00035 NyLPC_TUInt16 lport; /**< The local port number in network byte order. */ 00036 NyLPC_TUInt8 flags; /**フラグ*/ 00037 NyLPC_TUInt8 padding; /***/ 00038 }; 00039 00040 00041 00042 00043 struct NyLPC_TcMiMicIpUdpSocket 00044 { 00045 struct NyLPC_TiUdpSocket _super; 00046 //この変数は、uipタスクの実行する関数のみが変更する。 00047 struct uip_udp_conn uip_udp_conn; 00048 NyLPC_TcFifoBuffer_t rxbuf; 00049 NyLPC_TcMutex_t* _smutex; 00050 struct{ 00051 /** 受信ハンドラ。サービス実装に使用する。*/ 00052 NyLPC_TiUdpSocket_onRxHandler rx; 00053 /** 定期実行ハンドラ。サービス実装に使用する。最低保障周期は1s*/ 00054 NyLPC_TiUdpSocket_onPeriodicHandler periodic; 00055 }as_handler; 00056 }; 00057 00058 00059 00060 00061 00062 00063 /** 00064 * @param i_rbuf 00065 * 受信バッファアアドレス。サイズは、(最大受信サイズ-4バイト)*キュー数で計算します。 00066 * @param i_rbuf_len 00067 * 受信バッファのサイズ。 00068 */ 00069 NyLPC_TBool NyLPC_cMiMicIpUdpSocket_initialize(NyLPC_TcMiMicIpUdpSocket_t* i_inst,NyLPC_TUInt16 i_port,void* i_rbuf,NyLPC_TUInt16 i_rbuf_len); 00070 void NyLPC_cMiMicIpUdpSocket_finalize(NyLPC_TcMiMicIpUdpSocket_t* i_inst); 00071 00072 00073 #ifdef __cplusplus 00074 } 00075 #endif /* __cplusplus */ 00076 00077 00078 #endif /* NYLPC_CUDPSOCKET_H_ */
Generated on Tue Jul 12 2022 15:46:16 by 1.7.2