Modbus Vault v1.0
Loading...
Searching...
No Matches
modbus_analyzer.h File Reference

Analyzer for Modbus. More...

#include "esp_err.h"
#include "modbus_slicer.h"
#include "rs485_driver.h"
#include "slab_pool.h"
#include <stdint.h>
Include dependency graph for modbus_analyzer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  modbus_analyzer_frame_t
 Modbus analyzer frame structure. More...
 
struct  modbus_analyzer_config_t
 Modbus analyzer configuration structure. More...
 
struct  modbus_analyzer_t
 Modbus analyzer structure. More...
 

Macros

#define MODBUS_ANALYZER_TASK_NAME   ("MBUS_ALZ")
 
#define MODBUS_ANALYZER_TASK_STACK_DEPTH   (3072U)
 
#define MODBUS_ANALYZER_TASK_PRIORITY   (15U)
 
#define MODBUS_ANALYZER_TASK_CPU_AFFINITY   (0U)
 
#define MODBUS_ANALYZER_TASK_NOTIFY_STOP_BIT   (1U << 0)
 

Functions

esp_err_t modbus_analyzer_init (modbus_analyzer_t *analyzer_ptr, modbus_analyzer_config_t *config_ptr)
 Initialize Modbus analyzer.
 
void modbus_analyzer_deinit (modbus_analyzer_t *analyzer_ptr)
 Deinitialize Modbus analyzer.
 

Detailed Description

Analyzer for Modbus.

Author
Abanoub Salah
  • Provides interface for Modbus component
    • Receive bytes from lower layer and check for errors
    • Actively parse received bytes
    • Emits frame/error after parsing provided bytes

Macro Definition Documentation

◆ MODBUS_ANALYZER_TASK_CPU_AFFINITY

#define MODBUS_ANALYZER_TASK_CPU_AFFINITY   (0U)

CPU affinity

◆ MODBUS_ANALYZER_TASK_NAME

#define MODBUS_ANALYZER_TASK_NAME   ("MBUS_ALZ")

Task name

◆ MODBUS_ANALYZER_TASK_NOTIFY_STOP_BIT

#define MODBUS_ANALYZER_TASK_NOTIFY_STOP_BIT   (1U << 0)

Task stop bit

◆ MODBUS_ANALYZER_TASK_PRIORITY

#define MODBUS_ANALYZER_TASK_PRIORITY   (15U)

Priority

◆ MODBUS_ANALYZER_TASK_STACK_DEPTH

#define MODBUS_ANALYZER_TASK_STACK_DEPTH   (3072U)

Stack depth

Function Documentation

◆ modbus_analyzer_deinit()

void modbus_analyzer_deinit ( modbus_analyzer_t analyzer_ptr)

Deinitialize Modbus analyzer.

Parameters
analyzer_ptrPointer to analyzer instance
Here is the call graph for this function:
Here is the caller graph for this function:

◆ modbus_analyzer_init()

esp_err_t modbus_analyzer_init ( modbus_analyzer_t analyzer_ptr,
modbus_analyzer_config_t config_ptr 
)

Initialize Modbus analyzer.

Initialize Modbus analyzer by initializing a slicer instance

Parameters
analyzer_ptrPointer to analyzer instance
config_ptrPointer to analyzer configuration instance
Returns
esp_err_t Initialize result
Return values
ESP_OKInitialize success
ESP_ERR_INVALID_ARGProvided invalid argument(s)

< Task queue size

Here is the call graph for this function:
Here is the caller graph for this function: