@ -26,6 +26,7 @@ const (
DTTchar DataTypeType = "char"
DTTword DataTypeType = "word"
DTTdword DataTypeType = "dword"
DTTstring DataTypeType = "string"
)
// Gets Wordlength of S7-Type
@ -83,6 +84,8 @@ func MeasureSPSTypeLength(s DataTypeType) int8 {
return 2
case string(DTTdword): // Nicht verifiziert
return 4
case string(DTTstring): // Mindestens 1 Zeichen
return 1
default: // Nur im Fehlerfall
return -1
}