module IoTivity::Client
Overview
An IoTivity client.
Included Modules
- EventHandler
Defined in:
Constant Summary
-
Log =
::Log.for("IoTivity::Client")
Instance Method Summary
-
#closing?
Indicates the client is about to quit.
-
#discover(resource_type : String)
Searches the network for a resource_type by invoking
oc_do_ip_discovery
. -
#discover_all
Searches the network for all available resouces by invoking
oc_do_ip_discovery_all
. - #discover_myself
-
#discovered
A list of all devices discovered.
-
#discovered=(discovered)
A list of all devices discovered.
-
#myself
The device associated with the client itself.
-
#myself=(myself)
The device associated with the client itself.
-
#quit_client
Stops the IoTivity client.
-
#run_client(storage_dir)
Sets up and runs the IoTivity client.
-
#send_GET(to uri, at endpoints : IoTivity::ListOfEndpoints, query = nil, qos = OC::QoS::Low)
Sends a GET request via an invocation of
oc_do_get
. -
#send_POST(payload, to uri, at endpoints : IoTivity::ListOfEndpoints, query = nil, qos = OC::QoS::Low)
Sends a POST request via an invocation of
oc_init_post
/oc_do_post
.
Instance Method Detail
Searches the network for a resource_type by invoking
oc_do_ip_discovery
.
When a resource is found that has the resource_type listed in its
rt
array, a Discovery
event is triggered.
Searches the network for all available resouces by invoking
oc_do_ip_discovery_all
.
When a resource is found, a Discovery
event is triggered.
Sets up and runs the IoTivity client. storage_dir should name a path - either absolute or relative to the current working directory - in which IoTivity will load/store credentials, certificates and authentication info.
Sends a GET request via an invocation of oc_do_get
.
When a response from the server arrives, a Response
event is emitted.
Sends a POST request via an invocation of oc_init_post
/oc_do_post
.
When a response from the server arrives, a Response
event is emitted.