2000-10-01 12:31:20 +00:00
|
|
|
/*
|
2001-07-13 19:08:15 +00:00
|
|
|
* Hamlib CI-V backend - low level communication header
|
|
|
|
* Copyright (c) 2000,2001 by Stephane Fillod
|
2000-10-01 12:31:20 +00:00
|
|
|
*
|
2002-03-10 23:44:24 +00:00
|
|
|
* $Id: frame.h,v 1.10 2002-03-10 23:44:24 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
|
|
|
|
|
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);
|
|
|
|
|
2001-09-19 21:17:35 +00:00
|
|
|
int read_icom_block(port_t *p, unsigned char *rxbuffer, size_t count);
|
2000-10-01 12:31:20 +00:00
|
|
|
int icom_transaction (RIG *rig, int cmd, int subcmd, const char *payload, int payload_len, char *data, int *data_len);
|
2001-06-04 21:09:13 +00:00
|
|
|
int read_icom_frame(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);
|
|
|
|
void icom2rig_mode(RIG *rig, unsigned char md, char pd, rmode_t *mode, pbwidth_t *width);
|
2000-10-01 12:31:20 +00:00
|
|
|
|
|
|
|
#endif /* _FRAME_H */
|
|
|
|
|