2000-10-01 12:31:20 +00:00
|
|
|
/*
|
2001-07-13 19:08:15 +00:00
|
|
|
* Hamlib CI-V backend - low level communication header
|
2011-01-05 21:59:48 +00:00
|
|
|
* Copyright (c) 2000-2010 by Stephane Fillod
|
2000-10-01 12:31:20 +00:00
|
|
|
*
|
|
|
|
*
|
2011-08-21 01:45:47 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2000-10-01 12:31:20 +00:00
|
|
|
*
|
2011-08-21 01:45:47 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
2001-07-13 19:08:15 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2011-08-21 01:45:47 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2000-10-01 12:31:20 +00:00
|
|
|
*
|
2011-08-21 01:45:47 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2001-07-13 19:08:15 +00:00
|
|
|
* License along with this library; if not, write to the Free Software
|
2011-08-21 01:45:47 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2000-10-01 12:31:20 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _FRAME_H
|
|
|
|
#define _FRAME_H 1
|
|
|
|
|
2020-01-18 05:59:22 +00:00
|
|
|
#define MAXFRAMELEN 80
|
2000-10-08 21:35:48 +00:00
|
|
|
|
2000-10-01 12:31:20 +00:00
|
|
|
/*
|
2011-08-21 01:45:47 +00:00
|
|
|
* helper functions
|
2000-10-01 12:31:20 +00:00
|
|
|
*/
|
2011-01-05 21:59:48 +00:00
|
|
|
int make_cmd_frame(char frame[], char re_id, char ctrl_id, char cmd, int subcmd, const unsigned char *data, int data_len);
|
2000-10-01 12:31:20 +00:00
|
|
|
|
2006-07-18 22:51:43 +00:00
|
|
|
int icom_transaction (RIG *rig, int cmd, int subcmd, const unsigned char *payload, int payload_len, unsigned char *data, int *data_len);
|
2016-05-09 04:03:29 +00:00
|
|
|
int read_icom_frame(hamlib_port_t *p, unsigned char rxbuffer[], int rxbuffer_len);
|
2000-10-08 21:35:48 +00:00
|
|
|
|
2020-11-30 05:32:14 +00:00
|
|
|
int rig2icom_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width, unsigned char *md, signed char *pd);
|
2003-04-26 09:54:49 +00:00
|
|
|
void icom2rig_mode(RIG *rig, unsigned char md, int pd, rmode_t *mode, pbwidth_t *width);
|
2000-10-01 12:31:20 +00:00
|
|
|
|
|
|
|
#endif /* _FRAME_H */
|