Protocols

The following protocols are available globally.

  • An Action to be sent to the server. The action is sent by calling the call method.

    The set method returns the Action instance to allow the fields of the action to be set in fluent style. See VirtualDevice.createAction

    See more

    Declaration

    Swift

    public protocol Action
  • VirtualDevice for an enterprise-client adds methods to execute a write-only or executable attribute.

    See more

    Declaration

    Swift

    public protocol VirtualDevice : AbstractVirtualDevice
  • An event passed to the Alert callback.

    See more

    Declaration

    Swift

    public protocol AlertEvent : Event
  • An event passed to the Data callback.

    See more

    Declaration

    Swift

    public protocol DataEvent : Event
  • 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 a ChangeEvent. 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 calling set 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 set on an AbstractVirtualDevice attribute. This will cause a message to be sent to the server. The callback is invoked with an ErrorEvent 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 a ChangeEvent 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. A GET request simply calls get() on the attribute.

    See more

    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 more

    Declaration

    Swift

    public protocol NamedValue
  • An event passed to a callback.

    See more

    Declaration

    Swift

    public protocol Event
  • An event passed to the onChange callback to indicate one or more attribute values have changed.

    Seealso

    Event

    Declaration

    Swift

    public protocol ChangeEvent : Event
  • An event passed to the onError callback to indicate an error has occurred when setting one or more attributes.

    Seealso

    Event
    See more

    Declaration

    Swift

    public protocol ErrorEvent : Event
  • Client of the Oracle IoT Cloud Service. A client is a directly-connected device, a gateway, or an enterprise application.

    See more

    Declaration

    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 more

    Declaration

    Swift

    public protocol DeviceModel
  • An event passed to the onSync callback when content referred to by an attribute value has been successfully synchronized, or has failed to be synchronized.

    See more

    Declaration

    Swift

    public protocol SyncEvent