|
| | e12_esp32_node (uint32_t vid, uint32_t pid) |
| | Constructor for the e12_esp32_node class.
|
| |
| | ~e12_esp32_node () |
| | Destructor for the e12_esp32_node class.
|
| |
| virtual int | begin (void *bus, uint8_t e12_addr=0) |
| | Initializes the node with the given bus and address.
|
| |
| virtual uint32_t | get_time_ms () |
| | Gets the current time in milliseconds.
|
| |
| virtual int | send (e12_packet_t *buf, bool retry=true) |
| | Sends a packet to the e12 node.
|
| |
| virtual e12_packet_t * | read () |
| | Reads a packet from the e12 node.
|
| |
| virtual e12_log_evt_t * | get_log_evt () |
| | Gets the log event.
|
| |
| virtual int | log (uint8_t type, uint8_t status, uint32_t ts, void *data) |
| | Logs an event.
|
| |
| virtual int | on_config (const char *s, int len) |
| | Configures the node with the given settings.
|
| |
| virtual int | on_get_state (char *s, int len, void *ctx) |
| | Gets the current state of the node.
|
| |
| virtual int | on_restore_state (const char *s, int len) |
| | Restores the state of the node from the given string.
|
| |
| virtual int | set_node_auth_credentials (e12_auth_data_t *auth) |
| | Sets the authentication credentials for the node.
|
| |
| virtual int | on_wakeup () |
| | Wakes up the node.
|
| |
| virtual int | sleep (uint32_t ms, void *data) |
| | Puts the node to sleep for the specified duration.
|
| |
| virtual int | print_buffer (e12_onwire_t *buf) |
| | Prints the contents of the buffer.
|
| |
| | e12 (uint32_t vid, uint32_t pid) |
| | Constructor for the e12 class.
|
| |
| | ~e12 () |
| | Destructor for the e12 class.
|
| |
| e12_packet_t * | e12_get_packet () |
| | Gets a new packet for the e12 protocol.
|
| |
| e12_onwire_t * | encode (e12_packet_t *data) |
| | Encodes the given data into a packet.
|
| |
| e12_packet_t * | decode (e12_onwire_t *pkt, uint8_t data) |
| | Decodes the given data into a packet.
|
| |
| void | set_e12_device (e12_device_t *p) |
| | Sets the e12 device.
|
| |
| void | set_product_info (uint32_t vid, uint32_t pid) |
| | Sets the product information.
|
| |
| void | set_fwr_details (uint32_t fwr_version, mcu_arch_t arch, mcu_flashing_protocol_t protocol, bool enabled) |
| | Set the vmcu firmware details object.
|
| |
| uint32_t | get_fwr_version () |
| | Get the fwr version object.
|
| |
| uint32_t | get_pin_mask () |
| | Get the pin io mask object. top 16bit for analog, lower 16bit for digital.
|
| |
| uint32_t | get_pin_io_mask () |
| | Get the pin io mask object. top 16bit for analog, lower 16bit for digital.
|
| |
| int | publish_info () |
| | Publish info e.g fwr version, arch, protocol etc.
|
| |
| int | publish_profile () |
| | Publish profile info e.g pin configuration.
|
| |
| bool | set_pin_in (uint8_t pin_number, bool is_analog=false) |
| | Sets the pin as input and type (analog/digital)
|
| |
| bool | set_pin_out (uint8_t pin_number, bool is_analog=false) |
| | Sets the pin as output and type (analog/digital)
|
| |
| void | set_node_properties (e12_node_properties_t *props) |
| | Sets the properties of the e12 node.
|
| |
| void | set_timeout (uint32_t ms) |
| | Sets the timeout value.
|
| |
| bool | is_configured () |
| | Checks if the e12 endpoint is configured.
|
| |
| void | set_configured (bool status) |
| | Set the configured status for e12 endpoint.
|
| |
| uint32_t | get_version () |
| | Gets the version of the e12 protocol.
|
| |
| void | set_version (uint32_t v) |
| | Sets the version of the e12 protocol.
|
| |
| void | set_pin_mask (uint32_t pin_mask, uint32_t io_mask) |
| | Sets the bit mask for pin and io. Recommended to be used by advanced user or else use set_pin_in and set_pin_out.
|
| |
| virtual e12_packet_t * | get_request (e12_cmd_t cmd, bool response=true, void *data=0) |
| | Gets a request packet for the given command.
|
| |
| virtual e12_packet_t * | get_response (e12_packet_t *p) |
| | Gets a response packet for the given packet.
|
| |
| bool | get_message (e12_packet_t *data) |
| | Gets a message from the e12 protocol.
|
| |
| virtual int | on_receive (e12_packet_t *p) |
| | Handles the received packet.
|
| |
| virtual int | wakeup_e12_node () |
| | Wakes up the e12 node.
|
| |
| virtual int | on_ctl_read (uint8_t pin) |
| | allows READ state of any valid pin
|
| |
| virtual bool | on_ctl_write (uint8_t pin, uint32_t val) |
| | Validates a WRITE request (PIN <- IN only)
|
| |
This class represents an ESP32 node for the e12 protocol.
The e12_esp32_node class provides methods for initializing the node, handling communication, managing events, configuring the node, and performing utility functions. It extends the base e12 class and integrates with the TwoWire interface for I2C communication.