This is Webservice SDK for mbed. LPCXpresso1769/LPC1768/FRDM-K64F/LPC4088
Fork of libMiMic by
Diff: mbed/IpAddr.h
- Revision:
- 58:03b89038b21a
- Child:
- 60:803de2088243
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed/IpAddr.h Fri Sep 27 12:47:51 2013 +0000 @@ -0,0 +1,28 @@ +#pragma once +//////////////////////////////////////////////////////////////////////////////// +// TcpSocket.h +//////////////////////////////////////////////////////////////////////////////// + +#include "NyLPC_net.h" + +namespace MiMic +{ + /** + * This class hold IP address. + */ + class IpAddr + { + public: + union TAddrs{ + struct NyLPC_TIPv4Addr v4; + }addr; + public: + IpAddr(unsigned char p4,unsigned char p3,unsigned char p2,unsigned char p1) + {this->setIPv4(p4,p3,p2,p1);} + + void setIPv4(unsigned char p4,unsigned char p3,unsigned char p2,unsigned char p1) + {NyLPC_TIPv4Addr_set(&this->addr.v4,p4,p3,p2,p1);} + void setIPv4(const struct NyLPC_TIPv4Addr& v4) + {this->addr.v4=v4;} + }; +} \ No newline at end of file