Hamlib  4.0~git
iofunc.h
1 /*
2  * Hamlib Interface - io function header
3  * Copyright (c) 2000-2005 by Stephane Fillod and Frank Singleton
4  *
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  *
20  */
21 
22 #ifndef _IOFUNC_H
23 #define _IOFUNC_H 1
24 
25 // cppcheck-suppress *
26 #include <sys/types.h>
27 #include <hamlib/rig.h>
28 
29 
30 extern HAMLIB_EXPORT(int) port_open(hamlib_port_t *p);
31 extern HAMLIB_EXPORT(int) port_close(hamlib_port_t *p, rig_port_t port_type);
32 
33 
34 extern HAMLIB_EXPORT(int) read_block(hamlib_port_t *p,
35  char *rxbuffer,
36  size_t count);
37 
38 extern HAMLIB_EXPORT(int) write_block(hamlib_port_t *p,
39  const char *txbuffer,
40  size_t count);
41 
42 extern HAMLIB_EXPORT(int) read_string(hamlib_port_t *p,
43  char *rxbuffer,
44  size_t rxmax,
45  const char *stopset,
46  int stopset_len);
47 
48 #endif /* _IOFUNC_H */
read_string
int HAMLIB_API read_string(hamlib_port_t *p, char *rxbuffer, size_t rxmax, const char *stopset, int stopset_len)
Read a string from an fd.
Definition: iofunc.c:658
read_block
int HAMLIB_API read_block(hamlib_port_t *p, char *rxbuffer, size_t count)
Read bytes from an fd.
Definition: iofunc.c:538
rig.h
Hamlib rig data structures.
port_open
int HAMLIB_API port_open(hamlib_port_t *p)
Open a hamlib_port based on its rig port type.
Definition: iofunc.c:63
rig_port_t
enum rig_port_e rig_port_t
Port type.
port_close
int HAMLIB_API port_close(hamlib_port_t *p, rig_port_t port_type)
Close a hamlib_port.
Definition: iofunc.c:189
write_block
int HAMLIB_API write_block(hamlib_port_t *p, const char *txbuffer, size_t count)
Write a block of characters to an fd.
Definition: iofunc.c:421

Generated by doxygen 1.8.17

Hamlib documentation for version 4.0~git -- Mon Jun 15 2020 00:00:00
Project page: http://www.hamlib.org