3 Copyright (C) 2006 Markus Wildi, markus.wildi@datacomm.ch
5 This library is free software;
6 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;
10 version 2.1 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT
ANY WARRANTY;
14 without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License
for more details.
18 You should have received a copy of the GNU Lesser General Public
19 License along with
this library;
20 if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110 - 1301 USA
29 #define REQUEST_DOWNLOAD 0x00
30 #define REQUEST_DOWNLOAD_ALL 0x01
31 #define DOWNLOAD_COMPLETE 0x02
32 #define REQUEST_BUFFER_STATUS 0x03
33 #define REQUEST_IMAGE_INFO 0x04
34 #define REQUEST_IMAGE_DATA 0x05
36 #define REQUEST_COMPRESSED_IMAGE_DATA 0x07
37 #define SEND_KEY_PATTERN 0x08
38 #define DISPLAY_ECHO 0x09
39 #define FILE_STATUS 0x0b
40 #define REQUEST_ACK 0x10
44 #define LR_ROTARY_DECREASE_PATTERN 0x8000
45 #define LR_ROTARY_INCREASE_PATTERN 0x4000
46 #define UD_ROTARY_DECREASE_PATTERN 0x2000
47 #define UD_ROTARY_INCREASE_PATTERN 0x1000
48 #define SHIFT_PATTERN 0x0008
51 #define CAL_KEY_PATTERN 0x0100
52 #define TRACK_KEY_PATTERN 0x0200
53 #define DISPLAY_KEY_PATTERN 0x0400
54 #define FILEOPS_KEY_PATTERN 0x0800
55 #define A_KEY_PATTERN 0x0010
56 #define SETUP_KEY_PATTERN 0x0020
57 #define B_KEY_PATTERN 0x0040
58 #define INT_KEY_PATTERN 0x0080
59 #define FOCUS_KEY_PATTERN 0x0001
60 #define IMAGE_KEY_PATTERN 0x0002
61 #define MONITOR_KEY_PATTERN 0x0004
64 #define ID_BITS_MASK 0x0001
65 #define ID_BITS_10 0x0001
66 #define ID_BITS_8 0x0000
67 #define ID_UNITS_MASK 0x0002
68 #define ID_UNITS_INCHES 0x0002
69 #define ID_UNITS_CM 0x0000
70 #define ID_SCOPE_MASK 0x0004
71 #define ID_SCOPE_REFRACTOR 0x0004
72 #define ID_SCOPE_REFLECTOR 0x0000
73 #define ID_DATETIME_MASK 0x0008
74 #define ID_DATETIME_VALID 0x0008
75 #define ID_DATETIME_INVALID 0x0000
76 #define ID_BIN_MASK 0x0030
77 #define ID_BIN_1X1 0x0010
78 #define ID_BIN_2X2 0x0020
79 #define ID_BIN_3X3 0x0030
80 #define ID_PM_MASK 0x0400
81 #define ID_PM_PM 0x0400
82 #define ID_PM_AM 0x0000
83 #define ID_FILTER_MASK 0x0800
84 #define ID_FILTER_LUNAR 0x0800
85 #define ID_FILTER_NP 0x0000
86 #define ID_DARKSUB_MASK 0x1000
87 #define ID_DARKSUB_YES 0x1000
88 #define ID_DARKSUB_NO 0x0000
89 #define ID_MOSAIC_MASK 0x6000
90 #define ID_MOSAIC_NONE 0x0000
91 #define ID_MOSAIC_SMALL 0x2000
92 #define ID_MOSAIC_LARGE 0x4000
171 #define PARITY_NONE 0
172 #define PARITY_EVEN 1
181 int init_serial(
char *device_name,
int bit_rate,
int word_size,
int parity,
int stop_bits);
184 unsigned int calc_crc(
byte byte_array[],
int size);
unsigned int dateTimeValid
unsigned int imageIsMosaic
unsigned int adcResolution
unsigned int telescopeType
unsigned int filterStatus
unsigned int darkFrameSuntracted
unsigned int calc_crc(byte byte_array[], int size)
int init_serial(char *device_name, int bit_rate, int word_size, int parity, int stop_bits)
void shutdown_serial(int fd)