Package com.viam.sdk.core.module
Class BaseModule
java.lang.Object
viam.module.v1.ModuleServiceGrpc.ModuleServiceImplBase
com.viam.sdk.core.module.BaseModule
- All Implemented Interfaces:
io.grpc.BindableService,ModuleServiceGrpc.AsyncService
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBaseModule(String[] args) Create a new Module with the args provided in the command line. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResource(Module.AddResourceRequest request) protected Levelprotected abstract RobotClientprotected abstract io.grpc.ServerBuilder<?>ready(Module.ReadyRequest request) voidvoidprotected abstract voidsetParentAddress(String parentAddress) voidsetReady(boolean ready) voidstart()Start the module service and gRPC serverMethods inherited from class viam.module.v1.ModuleServiceGrpc.ModuleServiceImplBase
bindServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface viam.module.v1.ModuleServiceGrpc.AsyncService
addResource, ready, reconfigureResource, removeResource, validateConfig
-
Field Details
-
address
-
-
Constructor Details
-
BaseModule
Create a new Module with the args provided in the command line. The first argument after the command must be the socket path. If the second argument after the command is "--log-level=debug", the Module's logger will be DEBUG level. Otherwise, it will be INFO level. See LogLevel documentation in the RDK for more information on how to start modules with a "log-level" commandline argument.
-
-
Method Details
-
getLogLevel
-
getServerBuilder
protected abstract io.grpc.ServerBuilder<?> getServerBuilder() -
setReady
public void setReady(boolean ready) -
setParentAddress
-
getParent
-
start
public void start()Start the module service and gRPC server -
addResource
-
reconfigureResource
-
removeResource
-
ready
-
validateConfig
-