2012-04-11 10:46:09 +09:00
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
// Copyright (C) 2011, Robert Johansson, Raditex AB
|
|
|
|
// All rights reserved.
|
|
|
|
//
|
|
|
|
// rSCADA
|
|
|
|
// http://www.rSCADA.se
|
|
|
|
// info@rscada.se
|
|
|
|
//
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file mbus-tcp.h
|
|
|
|
*
|
|
|
|
* @brief Functions and data structures for sending M-Bus data via TCP.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MBUS_TCP_H
|
|
|
|
#define MBUS_TCP_H
|
|
|
|
|
2012-07-04 17:18:36 +02:00
|
|
|
#include "mbus-protocol.h"
|
|
|
|
#include "mbus-protocol-aux.h"
|
2012-04-11 10:46:09 +09:00
|
|
|
|
2012-07-04 17:18:36 +02:00
|
|
|
typedef struct _mbus_tcp_handle
|
|
|
|
{
|
2012-04-11 10:46:09 +09:00
|
|
|
char *host;
|
|
|
|
int port;
|
|
|
|
} mbus_tcp_handle;
|
|
|
|
|
2012-07-04 17:18:36 +02:00
|
|
|
int mbus_tcp_connect(mbus_handle *handle);
|
|
|
|
int mbus_tcp_disconnect(mbus_handle *handle);
|
|
|
|
int mbus_tcp_send_frame(mbus_handle *handle, mbus_frame *frame);
|
|
|
|
int mbus_tcp_recv_frame(mbus_handle *handle, mbus_frame *frame);
|
2012-04-11 10:46:09 +09:00
|
|
|
|
|
|
|
#endif /* MBUS_TCP_H */
|
|
|
|
|
|
|
|
|
|
|
|
|