TR-064 SOAP Library
|
Class to easily make TR-064 calls. This is the main class of this library. An object of this class keeps track of. More...
#include <tr064.h>
Public Types | |
enum | LoggingLevels { DEBUG_NONE, DEBUG_ERROR, DEBUG_WARNING, DEBUG_INFO, DEBUG_VERBOSE } |
enum | tr064_codes { TR064_CODE_UNKNOWNACTION = 401, TR064_CODE_FALSEARGUMENTS = 402, TR064_CODE_AUTHFAILED = 503, TR064_CODE_ARGUMENTVALUEINVALIDE = 600, TR064_CODE_ACTIONNOTAUTHORIZED = 606, TR064_CODE_ARRAYINDEXINVALID = 713, TR064_CODE_NOSUCHENTRY = 714, TR064_CODE_INTERNALERROR = 820, TR064_CODE_SECONDFACTORAUTHREQUIRED = 866, TR064_CODE_SECONDFACTORAUTHBLOCKED = 867, TR064_CODE_SECONDFACTORAUTHBUSY = 868 } |
HTTP codes see RFC7231. | |
Public Member Functions | |
TR064 () | |
Library/Class to easily make TR-064 calls. Do not construct this unless you have a working connection to the device! | |
TR064 (uint16_t port, const String &ip, const String &user, const String &pass) | |
Library/Class to easily make TR-064 calls. Do not construct this unless you have a working connection to the device! More... | |
TR064 & | setServer (uint16_t port, const String &ip, const String &user, const String &pass) |
Set the server parameters, needed if the empty constructor was used. More... | |
void | init () |
Initializes the library. Needs to be explicitly called. There should already be a working connection to the device. | |
int | state () |
Returns the State of Service Load. More... | |
bool | action (const String &service, const String &act, String params[][2]={}, int nParam=0, const String &url="") |
This function will call an action on the service of the device with certain parameters and return values. It will fill the array req with the values of the assiciated return variables of the request. In order to understand how to construct such a call, please consult the Github page. More... | |
bool | action (const String &service, const String &act, String params[][2], int nParam, String(*req)[2], int nReq, const String &url="") |
This function will call an action on the service of the device with certain parameters. In order to understand how to construct such a call, please consult the Github page. More... | |
String | md5String (const String &s) |
Translates a string into its MD5 hash. More... | |
String | byte2hex (byte number) |
Translates a byte number into a hex number. More... | |
Public Attributes | |
int | debug_level |
Available levels are DEBUG_NONE , DEBUG_ERROR , DEBUG_WARNING , DEBUG_INFO , and DEBUG_VERBOSE . | |
Class to easily make TR-064 calls. This is the main class of this library. An object of this class keeps track of.
enum TR064::LoggingLevels |
Different debug level DEBUG_NONE ///< Print no debug messages whatsoever DEBUG_ERROR ///< Only print error messages DEBUG_WARNING ///< Only print error and warning messages DEBUG_INFO ///< Print error, warning and info messages DEBUG_VERBOSE ///< Print all messages
TR064::TR064 | ( | uint16_t | port, |
const String & | ip, | ||
const String & | user, | ||
const String & | pass | ||
) |
Library/Class to easily make TR-064 calls. Do not construct this unless you have a working connection to the device!
port | Port number to be used to establish the TR-064 connection. |
ip | IP address to be used to establish the TR-064 connection. |
user | User name to be used to establish the TR-064 connection. |
pass | Password to be used to establish the TR-064 connection. |
TR064 & TR064::setServer | ( | uint16_t | port, |
const String & | ip, | ||
const String & | user, | ||
const String & | pass | ||
) |
Set the server parameters, needed if the empty constructor was used.
port | Port number to be used to establish the TR-064 connection. |
ip | IP address to be used to establish the TR-064 connection. |
user | User name to be used to establish the TR-064 connection. |
pass | Password to be used to establish the TR-064 connection. |
int TR064::state | ( | ) |
Returns the State of Service Load.
bool TR064::action | ( | const String & | service, |
const String & | act, | ||
String | params[][2] = {} , |
||
int | nParam = 0 , |
||
const String & | url = "" |
||
) |
This function will call an action on the service of the device with certain parameters and return values. It will fill the array req
with the values of the assiciated return variables of the request. In order to understand how to construct such a call, please consult the Github page.
service | The name of the service you want to adress. |
act | The action you want to perform on the service. |
params | A list of pairs of input parameters and values, e.g params[][2] = {{ "arg1", "value1" }, { "arg2", "value2" }} . |
nParam | The number of input parameters you passed. |
url | The url you want to call. |
bool TR064::action | ( | const String & | service, |
const String & | act, | ||
String | params[][2], | ||
int | nParam, | ||
String(*) | req[2], | ||
int | nReq, | ||
const String & | url = "" |
||
) |
This function will call an action on the service of the device with certain parameters. In order to understand how to construct such a call, please consult the Github page.
service | The name of the service you want to adress. |
act | The action you want to perform on the service. |
params | A list of pairs of input parameters and values, e.g params[][2] = {{ "arg1", "value1" }, { "arg2", "value2" }} . |
nParam | The number of input parameters you passed. |
req | A list of pairs of response parameters and values, e.g req[][2] = {{ "resp1", "" }, { "resp2", "" }} will be turned into req[][2] = {{ "resp1", "value1" }, { "resp2", "value2" }} |
nReq | The number of response parameters you passed. |
url | The url you want to call. |
String TR064::md5String | ( | const String & | text | ) |
Translates a string into its MD5 hash.
text | Input string of which to calculcate the md5 hash. |
String
). String TR064::byte2hex | ( | byte | number | ) |
Translates a byte number into a hex number.
number | byte number to be translated to hex. |
String
).