Registering a Resource Class

Last modified: Jul 5, 2019 @ 06:45

To register a resource class, you must register a URL and implement a class that will be used for the resource type. For example:

deviceManager.registerResource("/3303/0/5700", SensorValue.class);

The implementing class must extend ResourceBase, and extend a Resource that matches the resource data type. In the package, the following classes are available:

  • BooleanResource
  • ExecuteResource
  • FloatResource
  • IntegerResource
  • OpaqueResource
  • ResetResource
  • ResourceBase
  • StringResource
  • TimeResource