프로퍼티 | 타입 | 설명 | |
---|---|---|---|
GetResponseAsync | |||
MakeRequest |
메소드 | 설명 | |
---|---|---|
GetApiInfo ( ) : |
Gets API info.
|
|
GetCommand ( |
Gets a command This method returns all the commands that are waiting at the server since last GetCommand call. It returns immediately, regardless if there are commands to execute or not. |
|
HttpClient ( string Url, int RequestTimeout, string TimeStamp = null ) : System |
Constructs an HTTP client object If the caller has no intention to set a specific time stamp, DeteTime.MinValue can be used. |
|
PollCommand ( |
Polls command for execution This method returns the next command from the command queue. If there are no commands in the queue, it waits for ~30 seconds to receive a new command. |
|
PostNotification ( |
Sends a notification This method can be used by devices to send notifications. |
|
SetDevice ( |
Registers a device This method is called by device to register it at the server. |
|
UpdateCommandStatus ( |
Updates command status The devices are using this method to notify the server of command completion and its result. |
메소드 | 설명 | |
---|---|---|
GetResponseAsync ( |
Performs an asynchronous request and returns its response
|
|
MakeRequest ( string url, object obj, string Method, string id, string key ) : |
public GetCommand ( |
||
device | Device data of the device that is getting a command | |
onlyUnprocessed | bool | Get commands with empty status only |
리턴 |
public HttpClient ( string Url, int RequestTimeout, string TimeStamp = null ) : System | ||
Url | string | URL of the DeviceHive server |
RequestTimeout | int | Maximum request timeout |
TimeStamp | string | Timastamp of the last command |
리턴 | System |
public PollCommand ( |
||
device | Device data of the device that is polling a command | |
onlyUnprocessed | bool | Get commands with empty status only |
리턴 |
public PostNotification ( |
||
device | Device data of the device that is sending the notification | |
notification | INotification | Notification to be sent |
리턴 | bool |
public SetDevice ( |
||
device | Device data structure | |
리턴 | bool |
public UpdateCommandStatus ( |
||
device | Device data of the device that is updating a command status | |
CommandId | string | ID of the command to be updated |
status | Status of the command | |
리턴 | bool |