Package org.opentcs.drivers.peripherals
Schnittstelle PeripheralCommAdapter
- Alle Superschnittstellen:
Lifecycle
- Alle bekannten Implementierungsklassen:
BasicPeripheralCommAdapter
This interface declares the methods that a driver communicating with and controlling a
peripheral device must implement.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
abortJob()
Aborts the current job, if any.canProcess
(PeripheralJob job) Checks if the peripheral device would be able to process the given job, taking into account its current state.void
disable()
Disables this comm adapter, i.e. turns it off.void
enable()
Enables this comm adapter, i.e. turns it on.void
execute
(PeripheralAdapterCommand command) Executes the givenPeripheralAdapterCommand
.Returns a model of the peripheral device's and its communication adapter's attributes.boolean
Checks whether this communication adapter is enabled.void
process
(PeripheralJob job, PeripheralJobCallback callback) Processes the given job by sending it or a representation that the peripheral device understands to the peripheral device itself.Von Schnittstelle geerbte Methoden org.opentcs.components.Lifecycle
initialize, isInitialized, terminate
-
Methodendetails
-
enable
void enable()Enables this comm adapter, i.e. turns it on. -
disable
void disable()Disables this comm adapter, i.e. turns it off. -
isEnabled
boolean isEnabled()Checks whether this communication adapter is enabled.- Gibt zurück:
true
if, and only if, this communication adapter is enabled.
-
getProcessModel
Returns a model of the peripheral device's and its communication adapter's attributes.- Gibt zurück:
- A model of the peripheral device's and its communication adapter's attributes.
-
canProcess
Checks if the peripheral device would be able to process the given job, taking into account its current state.- Parameter:
job
- A job that might have to be processed.- Gibt zurück:
- An
ExplainedBoolean
telling if the peripheral device would be able to process the job.
-
process
Processes the given job by sending it or a representation that the peripheral device understands to the peripheral device itself.- Parameter:
job
- The job to process.callback
- The callback to use to report back about the successful or failed completion of the job.
-
abortJob
void abortJob()Aborts the current job, if any.Whether a job can actually be aborted depends on the actual peripheral/job semantics. The callback for the current job may still be called to indicate the job has failed, but it is not strictly expected to. The kernel will ignore calls to the callback after calling this method.
-
execute
Executes the givenPeripheralAdapterCommand
.- Parameter:
command
- The command to execute.
-