00001 //------------------------------------------------------------------------------ 00002 // Copyright (C) 2011, Robert Johansson, Raditex AB 00003 // All rights reserved. 00004 // 00005 // FreeSCADA 00006 // http://www.FreeSCADA.com 00007 // freescada@freescada.com 00008 // 00009 //------------------------------------------------------------------------------ 00010 00018 #ifndef MBUS_TCP_H 00019 #define MBUS_TCP_H 00020 00021 #include <mbus/mbus.h> 00022 00023 typedef struct _mbus_tcp_handle { 00024 00025 char *host; 00026 00027 int port; 00028 int sock; 00029 00030 } mbus_tcp_handle; 00031 00032 00033 mbus_tcp_handle *mbus_tcp_connect(char *host, int port); 00034 int mbus_tcp_disconnect(mbus_tcp_handle *handle); 00035 int mbus_tcp_send_frame(mbus_tcp_handle *handle, mbus_frame *frame); 00036 int mbus_tcp_recv_frame(mbus_tcp_handle *handle, mbus_frame *frame); 00037 00038 #endif /* MBUS_TCP_H */ 00039 00040 00041