Bi-Directional Communication (Request)¶
ListOperationalStates¶
Retrieve a list with activated Operational States for specified device. For the result please read ListOperationalStates from Bi-Directional Communication (Response) channel.
The Message by Control Protocol (SACP) should have the next structure:
| Part | Field name | Length (bits) | Value |
|---|---|---|---|
| Header | Channel | 2 | 0x02 |
| Data Classifier | 6 | 0x09 | |
| SARP | 16 | Routing Protocol (SARP) address information | |
| ACK | 1 | Acknowledgment flag | |
| TTL | 4 | Time to live | |
| Data length | 11 | 0x0 | |
| Payload | Data | 0 | Without Payload part |
ConfigurePinMode¶
Configure the specified pin to behave either as an:
INPUTOUTPUTINPUT_PULLUPINPUT_PULLDOWN
For the result please read ConfigurePinMode from Bi-Directional Communication (Response) channel.
The Message by Control Protocol (SACP) should have the next structure:
| Part | Field name | Length (bits) | Value |
|---|---|---|---|
| Header | Channel | 2 | 0x02 |
| Data Classifier | 6 | 0x0A | |
| SARP | 16 | Routing Protocol (SARP) address information | |
| ACK | 1 | Acknowledgment flag | |
| TTL | 4 | Time to live | |
| Data length | 11 | 0x2 | |
| Payload | Data | 8 | The number of the pin |
| 8 | The mode of the pin (see table above) |
Note
You can configure more than one Pin using single Message. Please use the
next sequence of bytes in Payload part of Message -> pin1, mode1,
pin2, mode2, ..., pinN, modeN
ReadDigitalPin¶
Read the value from a specified digital pin. For the result please read ReadDigitalPin from Bi-Directional Communication (Response) channel.
The Message by Control Protocol (SACP) should have the next structure:
| Part | Field name | Length (bits) | Value |
|---|---|---|---|
| Header | Channel | 2 | 0x02 |
| Data Classifier | 6 | 0x0B | |
| SARP | 16 | Routing Protocol (SARP) address information | |
| ACK | 1 | Acknowledgment flag | |
| TTL | 4 | Time to live | |
| Data length | 11 | 0x1 | |
| Payload | Data | 8 | The number of the pin |
Note
You can read more than one Pin using single Message. Please use the next
sequence of bytes in Payload part of Message -> pin1, pin2, ...,
pinN
WriteDigitalPin¶
Write a LOW or a HIGH level to a digital pin.
For the result please read WriteDigitalPin from Bi-Directional Communication (Response) channel.
The Message by Control Protocol (SACP) should have the next structure:
| Part | Field name | Length (bits) | Value |
|---|---|---|---|
| Header | Channel | 2 | 0x02 |
| Data Classifier | 6 | 0x0C | |
| SARP | 16 | Routing Protocol (SARP) address information | |
| ACK | 1 | Acknowledgment flag | |
| TTL | 4 | Time to live | |
| Data length | 11 | 0x2 | |
| Payload | Data | 8 | The number of the pin |
| 8 | The level (0x1=HIGH or
0x0=LOW) |
Note
You can write to more than one Pin using single Message. Please use the
next sequence of bytes in Payload part of Message -> pin1, value1,
pin2, value2, ..., pinN, valueN
ConfigureAnalogReference¶
Configure the reference voltage used for analog input. The modes are:
DEFAULTINTERNALINTERNAL1V1INTERNAL2V56INTERNAL1V5INTERNAL2V5EXTERNAL
For the result please read ConfigureAnalogReference from Bi-Directional Communication (Response) channel.
The Message by Control Protocol (SACP) should have the next structure:
| Part | Field name | Length (bits) | Value |
|---|---|---|---|
| Header | Channel | 2 | 0x02 |
| Data Classifier | 6 | 0x0D | |
| SARP | 16 | Routing Protocol (SARP) address information | |
| ACK | 1 | Acknowledgment flag | |
| TTL | 4 | Time to live | |
| Data length | 11 | 0x1 | |
| Payload | Data | 8 | The mode (see table above) |
ReadAnalogPin¶
Read the value from a specified analog pin. For the result please read ReadAnalogPin from Bi-Directional Communication (Response) channel.
The Message by Control Protocol (SACP) should have the next structure:
| Part | Field name | Length (bits) | Value |
|---|---|---|---|
| Header | Channel | 2 | 0x02 |
| Data Classifier | 6 | 0x0E | |
| SARP | 16 | Routing Protocol (SARP) address information | |
| ACK | 1 | Acknowledgment flag | |
| TTL | 4 | Time to live | |
| Data length | 11 | 0x1 | |
| Payload | Data | 8 | The number of the pin |
Note
You can read more than one Pin using single Message. Please use the next
sequence of bytes in Payload part of Message -> pin1, pin2, ...,
pinN