Modbus types and type functions.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | parameter | :: | MODBUS_ACCESS_NONE | = | 0 |
No access (invalid). |
integer, | public, | parameter | :: | MODBUS_ACCESS_READ | = | 1 |
Read access. |
integer, | public, | parameter | :: | MODBUS_ACCESS_WRITE | = | 2 |
Write access. |
integer, | public, | parameter | :: | MODBUS_MODE_NONE | = | 0 |
Invalid mode. |
integer, | public, | parameter | :: | MODBUS_MODE_RTU | = | 1 |
Modbus RTU. |
integer, | public, | parameter | :: | MODBUS_MODE_TCP | = | 2 |
Modbus TCP. |
integer, | public, | parameter | :: | MODBUS_ORDER_NONE | = | 0 |
None (integer or invalid). |
integer, | public, | parameter | :: | MODBUS_ORDER_ABCD | = | 1 |
ABCD byte order. |
integer, | public, | parameter | :: | MODBUS_ORDER_BADC | = | 2 |
BADC byte order. |
integer, | public, | parameter | :: | MODBUS_ORDER_CDAB | = | 3 |
CDBA byte order. |
integer, | public, | parameter | :: | MODBUS_ORDER_DCBA | = | 4 |
DCBA byte order. |
integer, | public, | parameter | :: | MODBUS_TYPE_NONE | = | 0 |
None (invalid). |
integer, | public, | parameter | :: | MODBUS_TYPE_INT16 | = | 1 |
2-byte signed integer. |
integer, | public, | parameter | :: | MODBUS_TYPE_INT32 | = | 2 |
2-byte signed integer. |
integer, | public, | parameter | :: | MODBUS_TYPE_UINT16 | = | 3 |
2-byte unsigned integer. |
integer, | public, | parameter | :: | MODBUS_TYPE_UINT32 | = | 4 |
4-byte unsigned integer. |
integer, | public, | parameter | :: | MODBUS_TYPE_FLOAT | = | 5 |
4-byte float. |
integer, | public, | parameter | :: | MODBUS_TYPE_LAST | = | 5 |
Never use this. |
integer, | public, | parameter | :: | MODBUS_TYPE_DEFAULT | = | MODBUS_TYPE_INT16 |
Default number type. |
integer, | public, | parameter | :: | MODBUS_ACCESS_NAME_LEN | = | 5 |
Max. access name length. |
integer, | public, | parameter | :: | MODBUS_MODE_NAME_LEN | = | 4 |
Max. mode name length. |
integer, | public, | parameter | :: | MODBUS_ORDER_NAME_LEN | = | 4 |
Max. byte order name length. |
integer, | public, | parameter | :: | MODBUS_TYPE_NAME_LEN | = | 6 |
Max. number type name length. |
character(len=*), | public, | parameter | :: | MODBUS_MODE_NAMES(MODBUS_MODE_NONE:MODBUS_MODE_TCP) | = | [character(len=MODBUS_MODE_NAME_LEN)::'none', 'rtu', 'tcp'] |
Modbus mode names. |
character(len=*), | public, | parameter | :: | MODBUS_TYPE_NAMES(MODBUS_TYPE_NONE:MODBUS_TYPE_LAST) | = | [character(len=MODBUS_TYPE_NAME_LEN)::'none', 'int16', 'int32', 'uint16', 'uint32', 'float'] |
Modbus number type names. |
Returns access enumerator from string or MODBUS_ACCESS_NONE
on
error.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Input string. |
Returns .true.
if access is a valid enumerator.
MODBUS_ACCESS_NONE
is invalid.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | access |
Modbus access enumerator. |
Returns mode enumerator from string or MODBUS_MODE_NONE
on
error.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Input string. |
Returns .true.
if mode is a valid enumerator. MODBUS_MODE_NONE
is invalid.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | mode |
Modbus mode enumerator. |
Returns byte order named parameter associated with given string.
For example, the result will be MODBUS_ORDER_ACBD
if name
is
ABCD
(case-insensitive). Returns MODBUS_ORDER_NONE
if the string
is invalid.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Input string. |
Returns .true.
if argument is a valid float byte order enumerator.
MODBUS_ORDER_NONE
is not a valid byte order.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | order |
Modbus byte order enumerator. |
Returns .true.
if the given Modbus number type is valid.
MODBUS_TYPE_NONE
is invalid.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | type |
Modbus number type. |
Returns Modbus number type from given name. If name
is invalid,
MODBUS_TYPE_NONE
is returned.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name |
Modbus type name. |