Package com.viam.sdk.core.resource
Class Resource
java.lang.Object
com.viam.sdk.core.resource.Resource
The base requirements for a Resource
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Defines the requirements for a Resource to be Reconfigurable.static interface
Defines the requirements for a Resource to be Stoppable. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Safely shutdown the Resource and prevent further use.Create a generic Status for the Resourcecom.google.protobuf.Struct
Send/Receive arbitrary commands to the ResourcegetName()
Get the ResourceName of the Resourceprotected static Common.ResourceName
-
Constructor Details
-
Resource
-
-
Method Details
-
named
-
getSubtype
-
getName
Get the ResourceName of the Resource- Returns:
- Resource's ResourceName
-
doCommand
Send/Receive arbitrary commands to the Resource- Parameters:
command
- the command to execute- Returns:
- result of the executed command
-
createStatus
Create a generic Status for the Resource- Returns:
- a Status
-
close
public void close()Safely shutdown the Resource and prevent further use. This function must be idempotent.
-