Class AlarmPacket
- java.lang.Object
-
- jmri.jmrix.ipocs.protocol.packets.Packet
-
- jmri.jmrix.ipocs.protocol.packets.AlarmPacket
-
public class AlarmPacket extends Packet
An alarm packet that can be sent by any party when something goes wrong which is not covered by an Acknowledgement Packet (or one wasn't requested).- Since:
- 4.21.2
-
-
Field Summary
Fields Modifier and Type Field Description static byte
IDENT
-
Constructor Summary
Constructors Constructor Description AlarmPacket()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description short
getAlarmCode()
byte
getAlarmLevel()
RqAlarmState
getAlarmState()
byte
getId()
int
getParameter1()
int
getParameter2()
protected void
parseSpecific(java.nio.ByteBuffer buffer)
protected byte[]
serializeSpecific()
void
setAlarmCode(short alarmCode)
void
setAlarmLevel(byte alarmLevel)
void
setAlarmState(RqAlarmState alarmState)
void
setParameter1(int parameter1)
void
setParameter2(int parameter2)
-
-
-
Field Detail
-
IDENT
public static final byte IDENT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AlarmPacket
public AlarmPacket()
-
-
Method Detail
-
parseSpecific
protected void parseSpecific(java.nio.ByteBuffer buffer)
- Specified by:
parseSpecific
in classPacket
-
serializeSpecific
protected byte[] serializeSpecific()
- Specified by:
serializeSpecific
in classPacket
-
getAlarmCode
public short getAlarmCode()
-
setAlarmCode
public void setAlarmCode(short alarmCode)
-
getAlarmLevel
public byte getAlarmLevel()
-
setAlarmLevel
public void setAlarmLevel(byte alarmLevel)
-
getAlarmState
public RqAlarmState getAlarmState()
-
setAlarmState
public void setAlarmState(RqAlarmState alarmState)
-
getParameter1
public int getParameter1()
-
setParameter1
public void setParameter1(int parameter1)
-
getParameter2
public int getParameter2()
-
setParameter2
public void setParameter2(int parameter2)
-
-