This is Webservice SDK for mbed. LPCXpresso1769/LPC1768/FRDM-K64F/LPC4088
Dependents: MbedFileServer_1768MiniDK2 RedWireBridge IssueDebug_gcc MiMicRemoteMCU-for-Mbed ... more
NyLPC_cSsdpSocket.h
00001 /* 00002 * NyLPC_cSsdpSocket.h 00003 * 00004 * Created on: 2013/07/26 00005 * Author: nyatla 00006 */ 00007 00008 #ifndef NYLPC_CSSDPSOCKET_H_ 00009 #define NYLPC_CSSDPSOCKET_H_ 00010 #include "NyLPC_netif.h" 00011 #include "NyLPC_UPnP_types.h" 00012 00013 #ifdef __cplusplus 00014 extern "C" { 00015 #endif /* __cplusplus */ 00016 00017 /** 00018 * DeviceDescriptionに含まれる最大デバイス数 00019 */ 00020 #define NyLPC_TcSsdpSocket_MAX_DEVICES 5 00021 00022 /** 00023 * @bug 00024 * TTLが64(4であるべき) 00025 */ 00026 typedef struct NyLPC_TcSsdpSocket NyLPC_TcSsdpSocket_t; 00027 00028 struct NyLPC_TcSsdpSocket 00029 { 00030 NyLPC_TiUdpSocket_t* _socket; 00031 NyLPC_TcStopwatch_t _periodic_sw; 00032 /** 00033 * locationパス 00034 */ 00035 const NyLPC_TChar* location_path; 00036 /** 00037 * DeviceDescriptionをホストするサーバアドレス 00038 */ 00039 NyLPC_TUInt16 location_port; 00040 NyLPC_TUInt8 number_of_device; 00041 /** 00042 * bit0:SSDPサービスの開始要求 00043 * bit1:SSDPサービスの停止要求 00044 * bit2:SSDPサービスの実行状態(1:start,0:stop) 00045 */ 00046 volatile NyLPC_TUInt8 _flags; 00047 /** 00048 * デバイスレコードの配列へのポインタ。 00049 * この値は、initialize関数でセットされたrootdeviceを水平展開したものです。 00050 * 0番目のレコードはルートデバイスです。 00051 */ 00052 const struct NyLPC_TUPnPDevDescDevice* ref_device_record[NyLPC_TcSsdpSocket_MAX_DEVICES]; 00053 }; 00054 00055 /** 00056 * DeviceRecordを参照したSSDPソケットインスタンスを生成します。 00057 * この関数はuipServiceが開始する前に実行してください。 00058 * @param i_inst 00059 * @param i_ref_dev_record 00060 * 0番目のデバイスがルートデバイス、以降は embeddedデバイスになります。 00061 * このオブジェクトはインスタンスが破棄されるまでの間維持してください。 00062 * @param i_number_of_devices 00063 * @param i_server_port 00064 * @param i_ref_location_path 00065 * deviceDescriptionのホストパスを設定します。 00066 * 例えば"upnp"の場合、locationはhttp://[:ip:]:[:port:]/upnp/ddesc.xmlとなります。 00067 */ 00068 void NyLPC_cSsdpSocket_initialize( 00069 NyLPC_TcSsdpSocket_t* i_inst, 00070 const struct NyLPC_TUPnPDevDescDevice* i_ref_dev_record, 00071 NyLPC_TUInt16 i_server_port,const NyLPC_TChar* i_ref_location_path); 00072 00073 void NyLPC_cSsdpSocket_finalize(NyLPC_TcSsdpSocket_t* i_inst); 00074 /** 00075 * SSDPサービスを開始します。 00076 */ 00077 void NyLPC_cSsdpSocket_start(NyLPC_TcSsdpSocket_t* i_inst); 00078 /** 00079 * SSDPサービスを停止します。 00080 */ 00081 void NyLPC_cSsdpSocket_stop(NyLPC_TcSsdpSocket_t* i_inst); 00082 00083 00084 #ifdef __cplusplus 00085 } 00086 #endif /* __cplusplus */ 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 #endif /* NYLPC_CSSDPSOCKET_H_ */
Generated on Tue Jul 12 2022 15:46:16 by 1.7.2