2000-10-01 12:31:20 +00:00
|
|
|
/*
|
2001-07-13 19:08:15 +00:00
|
|
|
* Hamlib CI-V backend - low level communication header
|
2005-04-03 12:27:17 +00:00
|
|
|
* Copyright (c) 2000-2005 by Stephane Fillod
|
2000-10-01 12:31:20 +00:00
|
|
|
*
|
2005-04-03 12:27:17 +00:00
|
|
|
* $Id: frame.h,v 1.14 2005-04-03 12:27:15 fillods Exp $
|
2000-10-01 12:31:20 +00:00
|
|
|
*
|
2001-07-13 19:08:15 +00:00
|
|
|
* This library is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Library General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of
|
|
|
|
* the License, or (at your option) any later version.
|
2000-10-01 12:31:20 +00:00
|
|
|
*
|
2001-07-13 19:08:15 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Library General Public License for more details.
|
2000-10-01 12:31:20 +00:00
|
|
|
*
|
2001-07-13 19:08:15 +00:00
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
2000-10-01 12:31:20 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _FRAME_H
|
|
|
|
#define _FRAME_H 1
|
|
|
|
|
2002-03-18 23:04:27 +00:00
|
|
|
#define MAXFRAMELEN 32
|
2000-10-08 21:35:48 +00:00
|
|
|
|
2000-10-01 12:31:20 +00:00
|
|
|
/*
|
|
|
|
* helper functions
|
|
|
|
*/
|
|
|
|
int make_cmd_frame(char frame[], char re_id, char cmd, int subcmd, const char *data, int data_len);
|
|
|
|
|
|
|
|
int icom_transaction (RIG *rig, int cmd, int subcmd, const char *payload, int payload_len, char *data, int *data_len);
|
2005-04-03 12:27:17 +00:00
|
|
|
int read_icom_frame(hamlib_port_t *p, unsigned char rxbuffer[]);
|
2000-10-08 21:35:48 +00:00
|
|
|
|
2002-03-10 23:44:24 +00:00
|
|
|
int rig2icom_mode(RIG *rig, rmode_t mode, pbwidth_t width, unsigned char *md, 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 */
|
|
|
|
|