libmbus/mbus/mbus-tcp.h
Stefan Wahren 55d4c0fba2 Remove trailing whitespace
Signed-off-by: Stefan Wahren <info@lategoodbye.de>
2013-09-13 17:53:33 +02:00

50 lines
1004 B
C
Executable File

//------------------------------------------------------------------------------
// 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
#include "mbus-protocol.h"
#include "mbus-protocol-aux.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _mbus_tcp_data
{
char *host;
uint16_t port;
} mbus_tcp_data;
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);
void mbus_tcp_data_free(mbus_handle *handle);
int mbus_tcp_set_timeout_set(double seconds);
#ifdef __cplusplus
}
#endif
#endif /* MBUS_TCP_H */