![]() |
modbus-arduino
1.0.0
Modbus library for Arduino
|
Modbus over TCP/IP network Class for Arduino Ethernet shield. More...
#include <ModbusIP.h>

Public Member Functions | |
| void | config (uint8_t *mac) |
| Connect a ModbusIP object to a network. More... | |
| void | config (ESP8266 &wifi, String ssid, String password) |
| Connect a ModbusIP object to a network. More... | |
| void | config (uint8_t *mac) |
| Connect a ModbusIP object to a network. More... | |
| void | config (uint8_t *mac, IPAddress ip) |
| Connect a ModbusIP object to a network. More... | |
| void | config (uint8_t *mac, IPAddress ip) |
| Connect a ModbusIP object to a network. More... | |
| void | config (uint8_t *mac, IPAddress ip, IPAddress dns) |
| Connect a ModbusIP object to a network. More... | |
| void | config (uint8_t *mac, IPAddress ip, IPAddress dns) |
| Connect a ModbusIP object to a network. More... | |
| void | config (uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway) |
| Connect a ModbusIP object to a network. More... | |
| void | config (uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway) |
| Connect a ModbusIP object to a network. More... | |
| void | config (uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) |
| Connect a ModbusIP object to a network. More... | |
| void | config (uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) |
| Connect a ModbusIP object to a network. More... | |
| ModbusIP () | |
| Default constructor. More... | |
| ModbusIP () | |
| Default constructor. More... | |
| ModbusIP () | |
| Default constructor. More... | |
| void | task () |
| Task that performs all operations on MODBUS. More... | |
| void | task () |
| Task that performs all operations on MODBUS. More... | |
| void | task () |
| Task that performs all operations on MODBUS. More... | |
Public Member Functions inherited from Modbus | |
| void | addCoil (word offset, bool value=false) |
| Add a coil. More... | |
| void | addHreg (word offset, word value=0) |
| Add a holding register to the list. More... | |
| void | addIreg (word offset, word value=0) |
| Add a input register. More... | |
| void | addIsts (word offset, bool value=false) |
| Add a discrete input. More... | |
| bool | Coil (word offset, bool value) |
| Change the value of a coil This value will be returned when bus read, the master can also modify it. More... | |
| bool | Coil (word offset) |
| Return the value of a coil. More... | |
| bool | Hreg (word offset, word value) |
| Change the value of a holding register This value will be returned when bus read, the master can also modify it. More... | |
| word | Hreg (word offset) |
| Return the value of a holding register. More... | |
| bool | Ireg (word offset, word value) |
| Change the value of an input register This value will be returned when bus read. More... | |
| word | Ireg (word offset) |
| Return the value of an input register. More... | |
| bool | Ists (word offset, bool value) |
| Change the value of a discrete input This value will be returned when bus read,. More... | |
| bool | Ists (word offset) |
| Return the value of a discrete input. More... | |
| Modbus () | |
| Default constructor. More... | |
Modbus over TCP/IP network Class for Arduino Ethernet shield.
Definition at line 22 of file ModbusIP.h.
| ModbusIP::ModbusIP | ( | ) |
Default constructor.
| ModbusIP::ModbusIP | ( | ) |
Default constructor.
| ModbusIP::ModbusIP | ( | ) |
Default constructor.
| void ModbusIP::config | ( | uint8_t * | mac | ) |
Connect a ModbusIP object to a network.
| mac | the MAC (Media access control) address for the device (array of 6 bytes). this is the Ethernet hardware address of your shield. Newer Arduino Ethernet Shields include a sticker with the device's MAC address. For older shields, choose your own. |
| void ModbusIP::config | ( | ESP8266 & | wifi, |
| String | ssid, | ||
| String | password | ||
| ) |
Connect a ModbusIP object to a network.
| wifi | ESP8266 NIC object |
| ssid | SSID of AP to join in |
| password | Password of AP to join in |
| void ModbusIP::config | ( | uint8_t * | mac | ) |
Connect a ModbusIP object to a network.
| mac | the MAC (Media access control) address for the device (array of 6 bytes). this is the Ethernet hardware address of your shield. Newer Arduino Ethernet Shields include a sticker with the device's MAC address. For older shields, choose your own. |
| void ModbusIP::config | ( | uint8_t * | mac, |
| IPAddress | ip | ||
| ) |
Connect a ModbusIP object to a network.
| mac | the MAC (Media access control) address for the device (array of 6 bytes). this is the Ethernet hardware address of your shield. Newer Arduino Ethernet Shields include a sticker with the device's MAC address. For older shields, choose your own. |
| ip | the IP address of the device (array of 4 bytes) |
| void ModbusIP::config | ( | uint8_t * | mac, |
| IPAddress | ip | ||
| ) |
Connect a ModbusIP object to a network.
| mac | the MAC (Media access control) address for the device (array of 6 bytes). this is the Ethernet hardware address of your shield. Newer Arduino Ethernet Shields include a sticker with the device's MAC address. For older shields, choose your own. |
| ip | the IP address of the device (array of 4 bytes) |
| void ModbusIP::config | ( | uint8_t * | mac, |
| IPAddress | ip, | ||
| IPAddress | dns | ||
| ) |
Connect a ModbusIP object to a network.
| mac | the MAC (Media access control) address for the device (array of 6 bytes). this is the Ethernet hardware address of your shield. Newer Arduino Ethernet Shields include a sticker with the device's MAC address. For older shields, choose your own. |
| ip | the IP address of the device (array of 4 bytes) |
| dns | the IP address of the DNS server (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1 |
| void ModbusIP::config | ( | uint8_t * | mac, |
| IPAddress | ip, | ||
| IPAddress | dns | ||
| ) |
Connect a ModbusIP object to a network.
| mac | the MAC (Media access control) address for the device (array of 6 bytes). this is the Ethernet hardware address of your shield. Newer Arduino Ethernet Shields include a sticker with the device's MAC address. For older shields, choose your own. |
| ip | the IP address of the device (array of 4 bytes) |
| dns | the IP address of the DNS server (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1 |
| void ModbusIP::config | ( | uint8_t * | mac, |
| IPAddress | ip, | ||
| IPAddress | dns, | ||
| IPAddress | gateway | ||
| ) |
Connect a ModbusIP object to a network.
| mac | the MAC (Media access control) address for the device (array of 6 bytes). this is the Ethernet hardware address of your shield. Newer Arduino Ethernet Shields include a sticker with the device's MAC address. For older shields, choose your own. |
| ip | the IP address of the device (array of 4 bytes) |
| dns | the IP address of the DNS server (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1 |
| gateway | the IP address of the network gateway (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1 |
| void ModbusIP::config | ( | uint8_t * | mac, |
| IPAddress | ip, | ||
| IPAddress | dns, | ||
| IPAddress | gateway | ||
| ) |
Connect a ModbusIP object to a network.
| mac | the MAC (Media access control) address for the device (array of 6 bytes). this is the Ethernet hardware address of your shield. Newer Arduino Ethernet Shields include a sticker with the device's MAC address. For older shields, choose your own. |
| ip | the IP address of the device (array of 4 bytes) |
| dns | the IP address of the DNS server (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1 |
| gateway | the IP address of the network gateway (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1 |
| void ModbusIP::config | ( | uint8_t * | mac, |
| IPAddress | ip, | ||
| IPAddress | dns, | ||
| IPAddress | gateway, | ||
| IPAddress | subnet | ||
| ) |
Connect a ModbusIP object to a network.
| mac | the MAC (Media access control) address for the device (array of 6 bytes). this is the Ethernet hardware address of your shield. Newer Arduino Ethernet Shields include a sticker with the device's MAC address. For older shields, choose your own. |
| ip | the IP address of the device (array of 4 bytes) |
| dns | the IP address of the DNS server (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1 |
| gateway | the IP address of the network gateway (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1 |
| subnet | the subnet mask of the network (array of 4 bytes). optional: defaults to 255.255.255.0 |
| void ModbusIP::config | ( | uint8_t * | mac, |
| IPAddress | ip, | ||
| IPAddress | dns, | ||
| IPAddress | gateway, | ||
| IPAddress | subnet | ||
| ) |
Connect a ModbusIP object to a network.
| mac | the MAC (Media access control) address for the device (array of 6 bytes). this is the Ethernet hardware address of your shield. Newer Arduino Ethernet Shields include a sticker with the device's MAC address. For older shields, choose your own. |
| ip | the IP address of the device (array of 4 bytes) |
| dns | the IP address of the DNS server (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1 |
| gateway | the IP address of the network gateway (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1 |
| subnet | the subnet mask of the network (array of 4 bytes). optional: defaults to 255.255.255.0 |
| void ModbusIP::task | ( | ) |
Task that performs all operations on MODBUS.
Call once inside loop(), all magic here !
| void ModbusIP::task | ( | ) |
Task that performs all operations on MODBUS.
Call once inside loop(), all magic here !
| void ModbusIP::task | ( | ) |
Task that performs all operations on MODBUS.
Call once inside loop(), all magic here !