Class Camera#

Nested Relationships#

Nested Types#

Class Documentation#

class Camera#

This class interfaces the Bonn shutter control port to a serial port.

This class describes the overall instrument camera system.

This class uses ioctl calls to read and write RS232 signals, normally used for handshaking. RTS(7) drives the shutter open pin 7, where pin 8 is tied to GND(5). Blade A (1) and B (2) status pins are open collector outputs that are pulled up to +5V (6) through 1k and are read by DSR(6) and CTS(8), respectively. Similarly, the error pin (4) is read by DCD(1). Consequently, these are active-LO outputs. Since the computer has no RS232 port, a USB-RS232 converter is used.

If is_enabled is cleared (false) then everything goes through the motions except do not send the ioctl commands to actually operate the shutter. This allows conditions that might wait on shutter open and close to behave as normal. The only difference is that the mechanism doesn’t move.

Public Types

enum frame_type_t#

ENUM list of frame types.

Values:

enumerator FRAME_IMAGE#
enumerator FRAME_RAW#
enumerator NUM_FRAME_TYPES#

Public Members

constexpr long MAX_SHUTTER_DELAY = 3000#
const char *const frame_type_str[NUM_FRAME_TYPES] = {"IMAGE", "RAW"}#
const std::string DAEMON_NAME = "camerad"#
int nbport#

non-blocking port

int blkport#

blocking port

int asyncport#

asynchronous message port

std::string asyncgroup#

asynchronous multicast group

int nonblocking_socket#
int blocking_socket#
std::atomic<int> cmd_num#
Common::CorrIdCache corr_cache#

dedup cache for tagged inter-daemon commands

std::vector<int> jclient_ports#
Network::TcpSocket nonblocking#
std::mutex conn_mutex#

mutex to protect against simultaneous access to Accept()