CARMA C++
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
optcam.h
1
#ifndef optical_camera_h
2
#define optical_camera_h
3
4
#include "carma/szaarrayutils/rtcnetcoms.h"
5
#include "carma/szautil/SzaPorts.h"
6
7
/*
8
* Optical camera information that is shared between sun control program and
9
* VxWorks tasks.
10
*/
11
12
/*
13
* Enumerate control-program -> optcam-task message types.
14
*/
15
typedef
enum
{
16
OPTCAM_GREETING
/* Sent by a client on connecting to the optcam task */
17
} CpToOptCam;
18
19
/*
20
* Enumerate optcam-task -> control-program message types.
21
*/
22
typedef
enum
{
23
OPTCAM_DATA_MSG
/* A message containing an image */
24
} OptCamToCp;
25
26
/*
27
* Set the size of the optcam network read-buffer.
28
*/
29
enum
{OPTCAM_MAX_CMD_SIZE=100};
30
31
/* The number of pixels in both axes of the frame grabber image */
32
33
//#define GRABBER_XNPIX 512
34
//#define GRABBER_YNPIX 480 /* NTSC standard -- last 32 rows of the frame grabber image are junk */
35
36
#define GRABBER_XNPIX 512
37
#define GRABBER_YNPIX 480
38
39
/*
40
* The border, in pixels, to blank.
41
*/
42
#define OPTCAM_IMAGE_BORDER 2
43
44
/* The size of the image (in pixels) returned by the frame grabber */
45
46
#define GRABBER_IM_SIZE (GRABBER_XNPIX*GRABBER_YNPIX)
47
48
/* The length (in bytes) of the date string to be sent with an image */
49
50
#define OPTCAM_DATE_LEN 8
51
52
/*
53
* The length (in bytes) of the tracker position to be sent with an image
54
* This is two 3-element registers of unsigned longs = 2 * 3 * 4 = 24 bytes
55
*/
56
57
#define OPTCAM_TRK_POS_LEN 24
58
59
/*
60
* The network buffer that is used to communicate images
61
* to the control program has size (in bytes) (image is returned as shorts)
62
* NET_PREFIX_LEN + OPTCAM_DATE_LEN + GRABBER_IM_SIZE*2
63
*/
64
#define OPTCAM_BUFF_SIZE (NET_PREFIX_LEN + OPTCAM_DATE_LEN + OPTCAM_TRK_POS_LEN + GRABBER_IM_SIZE*2)
65
66
#endif
carma
szaarrayutils
optcam.h
Generated by
1.8.5