Class StaticHelper
java.lang.Object
org.apache.plc4x.java.s7.readwrite.utils.StaticHelper
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1|
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
\__________/\__________/\____________________/
Module Number of Number of the partial
class the partial list
list
extract
Module Class:
+--------------+-----------------+
| Module class | Coding (Binary) |
+--------------|-----------------+
| CPU | 0000 |
+--------------|-----------------+
| IM | 0100 |
+--------------|-----------------+
| FM | 1000 |
+--------------|-----------------+
| CP | 1100 |
+--------------|-----------------+
Possible SSL Partial Lists:
+-----------------------------------------------------------|--------------+
| Module class | SSL-ID |
+-----------------------------------------------------------|--------------+
| Module identification | 16#xy11 |
+-----------------------------------------------------------|--------------+
| CPU characteristics | 16#xy12 |
+-----------------------------------------------------------|--------------+
| User memory areas | 16#xy13 |
+-----------------------------------------------------------|--------------+
| System areas | 16#xy14 |
+-----------------------------------------------------------|--------------+
| Block types | 16#xy15 |
+-----------------------------------------------------------|--------------+
| Interrupt status | 16#xy22 |
+-----------------------------------------------------------|--------------+
| Assignment between process image partitions and OBs | 16#xy25 |
+-----------------------------------------------------------|--------------+
| Communication status data | 16#xy32 |
+-----------------------------------------------------------|--------------+
| H CPU group information | 16#xy71 |
+-----------------------------------------------------------|--------------+
| Status of the module LEDs | 16#xy74 |
+-----------------------------------------------------------|--------------+
| Switched DP slaves in the H-system | 16#xy75 |
+-----------------------------------------------------------|--------------+
| Module status information | 16#xy91 |
+-----------------------------------------------------------|--------------+
| Rack / station status information | 16#xy92 |
+-----------------------------------------------------------|--------------+
| Rack / station status information | 16#xy94 |
+-----------------------------------------------------------|--------------+
| Extended DP master system / PROFINET IO system information| 16#xy95 |
+-----------------------------------------------------------|--------------+
| Module status information, PROFINET IO and PROFIBUS DP | 16#xy96 |
+-----------------------------------------------------------|--------------+
| Tool changer information (PROFINET IO) | 16#xy9C |
+-----------------------------------------------------------|--------------+
| Diagnostic buffer of the CPU | 16#xyA0 |
+-----------------------------------------------------------|--------------+
| Module diagnostic information (data record 0) | 16#xyB1 |
+-----------------------------------------------------------|--------------+
| Module diagnostic information (data record 1), | 16#xyB2 |
| geographical address | |
+-----------------------------------------------------------|--------------+
| Module diagnostic information (data record 1), | 16#xyB3 |
| logical address | |
+-----------------------------------------------------------|--------------+
| Diagnostic data of a DP slave | 16#xyB4 |
+-----------------------------------------------------------|--------------+
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic enumstatic enumstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringAlarmProcessing(S7AlarmEvent alarm, String alarmText, HashMap<String, HashMap<String, String>> textlists) Symbol Meaning ====== =======static intBcdToInt(ReadBuffer buffer) static voidByteToBcd(WriteBuffer buffer, short _value) static PlcResponseCodedecodeResponseCode(DataTransportErrorCode dataTransportErrorCode) static ShortDurationToS5Time(Duration duration) static IntegerDurationToS7Time(Duration data) static intEventItemLength(ReadBuffer buffer, int valueLength) static voidIntToS7msec(WriteBuffer buffer, int _value) static voidLeftShift3(WriteBuffer buffer, int _value) static byte[]static ShortLocalDateToS7Date(LocalDate data) static IntegerLocalTimeToS7Tod(LocalTime data) static Stringstatic LocalTimestatic StringparseS7Char(ReadBuffer io, String encoding) static StringparseS7String(ReadBuffer io, int stringLength, String encoding) static LocalDatestatic LocalDateTimestatic LocalTimestatic LocalTimestatic LocalTimestatic intRightShift3(ReadBuffer buffer) static DurationS5TimeToDuration(Short data) static LocalDateTimeS7DateAndTimeToLocalDateTime(int year, int month, int day, int hour, int min, int sec, int msec) static LocalDateTimeS7DateTimeToLocalDateTime(io.netty.buffer.ByteBuf data) static LocalDateS7DateToLocalDate(Short data) static intS7msecToInt(ReadBuffer buffer) static DurationS7TimeToDuration(Integer data) static LocalTimeS7TodToLocalTime(Integer data) static voidserializeS5Time(WriteBuffer io, PlcValue value) static voidserializeS7Char(WriteBuffer io, PlcValue value, String encoding) static voidserializeS7String(WriteBuffer io, PlcValue value, int stringLength, String encoding) static voidserializeTiaDate(WriteBuffer io, PlcValue value) static voidserializeTiaDateTime(WriteBuffer io, PlcValue value) static voidserializeTiaLTime(WriteBuffer io, PlcValue value) static voidserializeTiaTime(WriteBuffer io, PlcValue value) static voidserializeTiaTimeOfDay(WriteBuffer io, PlcValue value) static StringSysEventProcessing(S7SysEvent event, String eventtext, HashMap<String, HashMap<String, String>> textlists)
-
Constructor Details
-
StaticHelper
public StaticHelper()
-
-
Method Details
-
S5TimeToDuration
-
DurationToS5Time
-
S7TimeToDuration
-
DurationToS7Time
-
S7TodToLocalTime
-
LocalTimeToS7Tod
-
S7DateToLocalDate
-
LocalDateToS7Date
-
S7DateTimeToLocalDateTime
-
S7DateAndTimeToLocalDateTime
public static LocalDateTime S7DateAndTimeToLocalDateTime(int year, int month, int day, int hour, int min, int sec, int msec) -
LocalDateTimeToS7DateTime
-
ByteToBcd
- Throws:
SerializationException
-
BcdToInt
- Throws:
ParseException
-
S7msecToInt
- Throws:
ParseException
-
IntToS7msec
- Throws:
SerializationException
-
LeftShift3
- Throws:
SerializationException
-
RightShift3
- Throws:
ParseException
-
EventItemLength
-
decodeResponseCode
-
ModeEventProcessing
-
SysEventProcessing
-
AlarmProcessing
public static String AlarmProcessing(S7AlarmEvent alarm, String alarmText, HashMap<String, HashMap<String, String>> textlists) Symbol Meaning ====== =======- Parameters:
alarm- Alarm type from PLC.alarmText- The text string to be processed.textlists- List of texts for indexed replacement.- Returns:
- The text string with the replacement values.
-
parseTiaTime
-
serializeTiaTime
-
parseS5Time
-
serializeS5Time
-
parseTiaLTime
-
serializeTiaLTime
-
parseTiaTimeOfDay
-
serializeTiaTimeOfDay
-
parseTiaDate
-
serializeTiaDate
-
parseTiaDateTime
-
serializeTiaDateTime
-
parseS7Char
- Throws:
ParseException
-
parseS7String
-
serializeS7Char
-
serializeS7String
public static void serializeS7String(WriteBuffer io, PlcValue value, int stringLength, String encoding)
-