modbusd
modbus master daemon
|
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include <czmq.h>
#include "../../mb.h"
Functions | |
void | test_json_decode () |
void | test_json_encode () |
int | test_init_tcp_handle_and_connect () |
void | test_multiple_add_find () |
void | test_single_add_find () |
int | main () |
Variables | |
int | enable_syslog = 1 |
int main | ( | ) |
References BEGIN, enable_syslog, test_init_tcp_handle_and_connect(), test_json_decode(), test_json_encode(), test_multiple_add_find(), and test_single_add_find().
int test_init_tcp_handle_and_connect | ( | ) |
References enable_syslog, LOG, mbtcp_do_connect(), mbtcp_get_connection_status(), mbtcp_get_handle(), and mbtcp_init_handle().
Referenced by main().
void test_json_decode | ( | ) |
References cJSON_Delete(), cJSON_GetArrayItem(), cJSON_GetArraySize(), cJSON_GetObjectItem(), cJSON_Parse(), cJSON_Print(), and cJSON::valueint.
Referenced by main().
void test_json_encode | ( | ) |
References cJSON_AddItemToObject(), cJSON_AddNumberToObject, cJSON_AddStringToObject, cJSON_CreateIntArray(), cJSON_CreateObject(), cJSON_Delete(), and cJSON_Print().
Referenced by main().
void test_multiple_add_find | ( | ) |
References BEGIN, mbtcp_handle_s::connected, mbtcp_handle_s::ctx, enable_syslog, HASH_ADD, HASH_COUNT, HASH_FIND, mbtcp_key_s::ip, mbtcp_handle_s::key, LOG, and mbtcp_key_s::port.
Referenced by main().
void test_single_add_find | ( | ) |
References BEGIN, mbtcp_handle_s::connected, mbtcp_handle_s::ctx, enable_syslog, HASH_ADD, HASH_DEL, HASH_FIND, HASH_ITER, mbtcp_key_s::ip, mbtcp_handle_s::key, LOG, and mbtcp_key_s::port.
Referenced by main().
int enable_syslog = 1 |
Referenced by main(), mbtcp_cmd_hanlder(), mbtcp_do_connect(), mbtcp_get_connection_status(), mbtcp_get_handle(), mbtcp_get_response_timeout(), mbtcp_init_handle(), mbtcp_list_handles(), mbtcp_multi_write_req_fn(), mbtcp_read_bit_req_fn(), mbtcp_read_reg_req_fn(), mbtcp_set_response_timeout(), mbtcp_single_write_req_fn(), set_modbus_fail_resp_str(), set_modbus_fail_resp_str_with_errno(), set_modbus_success_resp_str_with_data(), test_init_tcp_handle_and_connect(), test_multiple_add_find(), and test_single_add_find().