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
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBaseModule
(String[] args) Create a new Module with the args provided in the command line. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addResource
(Module.AddResourceRequest request) protected Level
protected abstract RobotClient
protected abstract io.grpc.ServerBuilder<?>
ready
(Module.ReadyRequest request) void
void
protected abstract void
setParentAddress
(String parentAddress) void
setReady
(boolean ready) void
start()
Start the module service and gRPC serverMethods inherited from class viam.module.v1.ModuleServiceGrpc.ModuleServiceImplBase
bindService
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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
-