Protocols
The following protocols are available globally.
-
An Alert to be sent to the server. The alert is sent by calling the
raise()
method. The time of the alert is set whenraise()
is called, allowingraise()
to be called more than once.The
See moreset
method returns theAlert
instance to allow the fields of the alert to be set in fluent style.Declaration
Swift
public protocol Alert
-
Data is an object that represents a set of custom data fields (key/value pairs) defined in the formats section of the device model. The custom data is sent by calling the
submit
method.The
See moreset
method returns theData
instance to allow the data fields to be set in fluent style.Declaration
Swift
public protocol Data
-
VirtualDevice for a device-client adds methods to handle write-only and executable actions.
See moreDeclaration
Swift
public protocol VirtualDevice : AbstractVirtualDevice
-
AbstractVirtualDevice is a representation of a device model implemented by a device. A device model is a specification of the attributes, formats, and resources available on the device.
The AbstractVirtualDevice API is common to both the enterprise client and the device client. The semantics of the API are also the same. The processing model on the enterprise client is different, however, from the processing model on the device client.
On the enterprise client, an enterprise application calls the
AbstractVirtualDevice
set methods in order to affect a change on the physical device. The enterprise client application receives confirmation of that the change was accepted via a callback with aChangeEvent
. The callback indicates to the enterprise client that the value of the attribute on the device has changed. This callback may come as a result of the enterprise client callingset
on the attribute, or it may come unsolicited as a result of the device-client updating the value from the physical device.The enterprise client may also receive a callback with an
ErrorEvent
if the attribute value change was not accepted. This could be because the request timed out, the connection failed, or the change was explicitly rejected. The callback indicates to the enterprise client that it should roll-back the attribute value to the last known value.On the device client, the application will call
See moreset
on anAbstractVirtualDevice
attribute. This will cause a message to be sent to the server. The callback is invoked with anErrorEvent
if there is an error sending the message to the server. Any enterprise application that is monitoring the device will be notified via the callback with aChangeEvent
that the value has changed. When the client-library receives a request from the server, the request is forwarded to a handler which invokes the callback on the requested attribute. AGET
request simply callsget()
on the attribute.Declaration
Swift
public protocol AbstractVirtualDevice
-
A name-value pair in an event. Typically, the name is the name of an attribute, and value is the attribute’s value. But a name-value pair could also be the name of a field in a format, or the name of an action.
See moreDeclaration
Swift
public protocol NamedValue
-
An event passed to a callback.
See moreDeclaration
Swift
public protocol Event
-
Client of the Oracle IoT Cloud Service. A client is a directly-connected device, a gateway, or an enterprise application.
See moreDeclaration
Swift
public protocol Client
-
Detailed information on a device model. A device model is a specification of the attributes, formats, and resources available on the device.
See moreDeclaration
Swift
public protocol DeviceModel
-
An event passed to the
See moreonSync
callback when content referred to by an attribute value has been successfully synchronized, or has failed to be synchronized.Declaration
Swift
public protocol SyncEvent