41 #ifndef YOCTO_NETWORK_H 42 #define YOCTO_NETWORK_H 55 #ifndef _Y_READINESS_ENUM 56 #define _Y_READINESS_ENUM 66 #ifndef _Y_DISCOVERABLE_ENUM 67 #define _Y_DISCOVERABLE_ENUM 74 #ifndef _Y_CALLBACKMETHOD_ENUM 75 #define _Y_CALLBACKMETHOD_ENUM 83 #ifndef _Y_CALLBACKENCODING_ENUM 84 #define _Y_CALLBACKENCODING_ENUM 100 #define Y_MACADDRESS_INVALID (YAPI_INVALID_STRING) 101 #define Y_IPADDRESS_INVALID (YAPI_INVALID_STRING) 102 #define Y_SUBNETMASK_INVALID (YAPI_INVALID_STRING) 103 #define Y_ROUTER_INVALID (YAPI_INVALID_STRING) 104 #define Y_IPCONFIG_INVALID (YAPI_INVALID_STRING) 105 #define Y_PRIMARYDNS_INVALID (YAPI_INVALID_STRING) 106 #define Y_SECONDARYDNS_INVALID (YAPI_INVALID_STRING) 107 #define Y_NTPSERVER_INVALID (YAPI_INVALID_STRING) 108 #define Y_USERPASSWORD_INVALID (YAPI_INVALID_STRING) 109 #define Y_ADMINPASSWORD_INVALID (YAPI_INVALID_STRING) 110 #define Y_HTTPPORT_INVALID (YAPI_INVALID_UINT) 111 #define Y_DEFAULTPAGE_INVALID (YAPI_INVALID_STRING) 112 #define Y_WWWWATCHDOGDELAY_INVALID (YAPI_INVALID_UINT) 113 #define Y_CALLBACKURL_INVALID (YAPI_INVALID_STRING) 114 #define Y_CALLBACKCREDENTIALS_INVALID (YAPI_INVALID_STRING) 115 #define Y_CALLBACKINITIALDELAY_INVALID (YAPI_INVALID_UINT) 116 #define Y_CALLBACKSCHEDULE_INVALID (YAPI_INVALID_STRING) 117 #define Y_CALLBACKMINDELAY_INVALID (YAPI_INVALID_UINT) 118 #define Y_CALLBACKMAXDELAY_INVALID (YAPI_INVALID_UINT) 119 #define Y_POECURRENT_INVALID (YAPI_INVALID_UINT) 131 #pragma option push -w-8022 247 {
return this->get_readiness(); }
257 string get_macAddress(
void);
260 {
return this->get_macAddress(); }
270 string get_ipAddress(
void);
273 {
return this->get_ipAddress(); }
282 string get_subnetMask(
void);
285 {
return this->get_subnetMask(); }
294 string get_router(
void);
297 {
return this->get_router(); }
318 string get_ipConfig(
void);
321 {
return this->get_ipConfig(); }
323 int set_ipConfig(
const string& newval);
325 {
return this->set_ipConfig(newval); }
334 string get_primaryDNS(
void);
337 {
return this->get_primaryDNS(); }
350 int set_primaryDNS(
const string& newval);
352 {
return this->set_primaryDNS(newval); }
361 string get_secondaryDNS(
void);
364 {
return this->get_secondaryDNS(); }
377 int set_secondaryDNS(
const string& newval);
379 {
return this->set_secondaryDNS(newval); }
388 string get_ntpServer(
void);
391 {
return this->get_ntpServer(); }
403 int set_ntpServer(
const string& newval);
405 {
return this->set_ntpServer(newval); }
416 string get_userPassword(
void);
419 {
return this->get_userPassword(); }
434 int set_userPassword(
const string& newval);
436 {
return this->set_userPassword(newval); }
447 string get_adminPassword(
void);
450 {
return this->get_adminPassword(); }
465 int set_adminPassword(
const string& newval);
467 {
return this->set_adminPassword(newval); }
476 int get_httpPort(
void);
479 {
return this->get_httpPort(); }
492 int set_httpPort(
int newval);
494 {
return this->set_httpPort(newval); }
503 string get_defaultPage(
void);
506 {
return this->get_defaultPage(); }
519 int set_defaultPage(
const string& newval);
521 {
return this->set_defaultPage(newval); }
536 {
return this->get_discoverable(); }
552 {
return this->set_discoverable(newval); }
565 int get_wwwWatchdogDelay(
void);
568 {
return this->get_wwwWatchdogDelay(); }
584 int set_wwwWatchdogDelay(
int newval);
586 {
return this->set_wwwWatchdogDelay(newval); }
595 string get_callbackUrl(
void);
598 {
return this->get_callbackUrl(); }
610 int set_callbackUrl(
const string& newval);
612 {
return this->set_callbackUrl(newval); }
625 {
return this->get_callbackMethod(); }
639 {
return this->set_callbackMethod(newval); }
655 {
return this->get_callbackEncoding(); }
672 {
return this->set_callbackEncoding(newval); }
683 string get_callbackCredentials(
void);
686 {
return this->get_callbackCredentials(); }
705 int set_callbackCredentials(
const string& newval);
707 {
return this->set_callbackCredentials(newval); }
722 int callbackLogin(
string username,
string password);
731 int get_callbackInitialDelay(
void);
734 {
return this->get_callbackInitialDelay(); }
746 int set_callbackInitialDelay(
int newval);
748 {
return this->set_callbackInitialDelay(newval); }
757 string get_callbackSchedule(
void);
760 {
return this->get_callbackSchedule(); }
771 int set_callbackSchedule(
const string& newval);
773 {
return this->set_callbackSchedule(newval); }
782 int get_callbackMinDelay(
void);
785 {
return this->get_callbackMinDelay(); }
796 int set_callbackMinDelay(
int newval);
798 {
return this->set_callbackMinDelay(newval); }
807 int get_callbackMaxDelay(
void);
810 {
return this->get_callbackMaxDelay(); }
822 int set_callbackMaxDelay(
int newval);
824 {
return this->set_callbackMaxDelay(newval); }
836 int get_poeCurrent(
void);
839 {
return this->get_poeCurrent(); }
868 static YNetwork* FindNetwork(
string func);
901 virtual int useDHCP(
string fallbackIpAddr,
int fallbackSubnetMaskLen,
string fallbackRouter);
913 virtual int useDHCPauto(
void);
927 virtual int useStaticIP(
string ipAddress,
int subnetMaskLen,
string router);
938 virtual string ping(
string host);
950 virtual int triggerCallback(
void);
965 virtual int set_periodicCallbackSchedule(
string interval,
int offset);
980 {
return this->nextNetwork();}
991 static YNetwork* FirstNetwork(
void);
string secondaryDNS(void)
YNetwork * yFirstNetwork(void)
static const string SUBNETMASK_INVALID
int _callbackInitialDelay
int setCallbackMaxDelay(int newval)
int setCallbackUrl(const string &newval)
Y_DISCOVERABLE_enum _discoverable
int setHttpPort(int newval)
int setCallbackSchedule(const string &newval)
static const string CALLBACKCREDENTIALS_INVALID
static YNetwork * Find(string func)
static const string DEFAULTPAGE_INVALID
int setUserPassword(const string &newval)
string callbackSchedule(void)
#define YAPI_INVALID_UINT
Y_CALLBACKENCODING_enum callbackEncoding(void)
int setSecondaryDNS(const string &newval)
static const string PRIMARYDNS_INVALID
string callbackCredentials(void)
static YNetwork * FindNetwork(string func)
int setIpConfig(const string &newval)
static const string MACADDRESS_INVALID
int setCallbackCredentials(const string &newval)
virtual int _parseAttr(YJSONObject *json_val)
Y_CALLBACKMETHOD_enum callbackMethod(void)
static const string CALLBACKSCHEDULE_INVALID
int callbackInitialDelay(void)
static YNetwork * FirstNetwork(void)
static const string IPCONFIG_INVALID
static const string ROUTER_INVALID
Y_DISCOVERABLE_enum discoverable(void)
static const string IPADDRESS_INVALID
YNetworkValueCallback _valueCallbackNetwork
int wwwWatchdogDelay(void)
virtual int registerValueCallback(YFunctionValueCallback callback)
Y_CALLBACKENCODING_enum _callbackEncoding
void(* YNetworkValueCallback)(YNetwork *func, const string &functionValue)
int callbackMaxDelay(void)
static YNetwork * First(void)
static const string USERPASSWORD_INVALID
static const string SECONDARYDNS_INVALID
int setCallbackMinDelay(int newval)
int setCallbackMethod(Y_CALLBACKMETHOD_enum newval)
string adminPassword(void)
#define YOCTO_CLASS_EXPORT
static const string CALLBACKURL_INVALID
Y_READINESS_enum readiness(void)
int callbackMinDelay(void)
int setDiscoverable(Y_DISCOVERABLE_enum newval)
static const string ADMINPASSWORD_INVALID
int setCallbackInitialDelay(int newval)
string userPassword(void)
int setNtpServer(const string &newval)
int setDefaultPage(const string &newval)
int setPrimaryDNS(const string &newval)
Y_READINESS_enum _readiness
int setCallbackEncoding(Y_CALLBACKENCODING_enum newval)
int setWwwWatchdogDelay(int newval)
YNetwork * yFindNetwork(const string &func)
static const string NTPSERVER_INVALID
Y_CALLBACKMETHOD_enum _callbackMethod
int setAdminPassword(const string &newval)
string _callbackCredentials
virtual int _invokeValueCallback(string value)