-
public interface MachineDataMachine data interface for reading and writing machine signals on the machine CAN-backbones.
-
-
Method Summary
Modifier and Type Method Description abstract MachineSignalreadSignal(int signalId)Returns a signal in a MachineData object. abstract booleanwriteSignal(int signalId, double value)Writes signal as defined in the GSL specification. abstract Array<byte>readRawSignal(int signalId)Returns a raw signal in a byte[]. abstract booleanwriteRawSignal(int signalId, Array<byte> value)Writes signal as defined in the GSL specification. abstract GflHandlerregisterFrame(CanBus canBus, int frameId, boolean extended, byte maxQueueSize)Register the intent to receive can messages with the specified address.Throws SecurityException if caller don't holdsse.cpacsystems.permission. abstract booleanwriteFrame(CanBus canBus, int frameId, boolean extended, Array<byte> data)Write a can messages on the specified can-bus with the specified address.Throws SecurityException if caller don't holdsse.cpacsystems.permission. -
-
Method Detail
-
readSignal
@NonNull() abstract MachineSignal readSignal(int signalId)
Returns a signal in a MachineData object. The signal must be defined in the GSL interface.The signal value in the MachineData object is scaled according to the GLS specification.
This method always returns immediately, whether or not the signal has been received.
- Parameters:
signalId- the signal to read
-
writeSignal
abstract boolean writeSignal(int signalId, double value)
Writes signal as defined in the GSL specification.
The GSL interface specifies the signal attributes such as bit length, factor and offset.The attributes are used to convert the signal to the CAN bus representation.
Special case: Signal with a bitLength=64 is used to write complete CAN frame, where nofactor nor offset is applied to the data, i.e. the signal/frame is written as provided.
- Parameters:
signalId- the signal idvalue- the signal data to write
-
readRawSignal
@NonNull() abstract Array<byte> readRawSignal(int signalId)
Returns a raw signal in a byte[]. The signal must be defined in the GSL interface.No processing is done. The signal data is returned as received in the correspondingcan frame.
This method always returns immediately, whether or not the signal has been received.If no current data is available an empty (size 0) array is returned.
- Parameters:
signalId- the signal to read
-
writeRawSignal
abstract boolean writeRawSignal(int signalId, Array<byte> value)
Writes signal as defined in the GSL specification.
The GSL interface specifies the signal.
Where is no factor nor offset applied to the data, i.e. the corresponding bits in thesignal/frame is written as provided.
- Parameters:
signalId- the signal idvalue- the signal data to write
-
registerFrame
@Nullable() abstract GflHandler registerFrame(CanBus canBus, int frameId, boolean extended, byte maxQueueSize)
Register the intent to receive can messages with the specified address.Throws SecurityException if caller don't holdsse.cpacsystems.permission.READ_MACHINE_SIGNAL
- Parameters:
canBus- The bus (CAN4,CAN5,CAN6) to receive messages onframeId- The address of messages to receiveextended- True for extended addressing and false for standardmaxQueueSize- The maximum number of messages to save
-
writeFrame
abstract boolean writeFrame(CanBus canBus, int frameId, boolean extended, Array<byte> data)
Write a can messages on the specified can-bus with the specified address.Throws SecurityException if caller don't holdsse.cpacsystems.permission.WRITE_MACHINE_SIGNAL
- Parameters:
canBus- The bus (CAN4,CAN5,CAN6) to receive messages onframeId- The address of messages to receiveextended- True for extended addressing and false for standarddata- Data to transmit
-
-
-
-