camtypes.h File Reference
#include <string.h>
#include <stdint.h>
#include <sstream>
#include <vector>
#include <string>
Include dependency graph for camtypes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CrossControl::ImagerRegister
 Definition of an address/value pair of imager register. More...
 
struct  CrossControl::TimeStamp
 Definition of a timestamp. More...
 
struct  CrossControl::VideoContent
 Defines the format of a video content notification package. More...
 
struct  CrossControl::CamStatus
 Defines the camera status information. More...
 
struct  CrossControl::ControlStatus
 Definition of a camera control mode register. More...
 
struct  CrossControl::SignedControl
 Definition of a signed camera control. More...
 
struct  CrossControl::UnsignedControl
 Definition of a unsigned camera control. More...
 
struct  CrossControl::CombinedControl
 Definition of a combined camera control. More...
 
struct  CrossControl::PixelPosition
 Definition of the position of a single pixel relative to a window. (0,0) Is the top left corner. The effects of the optical system (e.g. lens) are included. More...
 
struct  CrossControl::Rectangle
 Definition of a rectangular area using two pixels coordinates. More...
 
struct  CrossControl::PixelMap
 Defines a group of independent pixels. This structure is used, for instance, to report the position of defect pixel in the imager. More...
 
struct  CrossControl::ImageDimension
 Definition of the image dimension, in pixels. More...
 
struct  CrossControl::ImagerCharacteristic
 Defines the characteristics of the camera. More...
 
struct  CrossControl::IntrinsicCamParam
 The intrinsic camera parameters determine the projection from 3-D camera coordinates to 2-D pixel coordinates. The intrinsic parameters of the camera can be read out by application software and can be used for back-projection form a 2-D image position to a line in 3-D space. More...
 
struct  CrossControl::ExtrinsicCamParam
 The extrinsic camera parameters determine the mapping from 3-D vehicle coordinatesto 3-D camera coordinates. The extrinsic parameters of the camera can be written and read out by application software and can be used, in conjunction with the intrinsic camera parameters, for backprojection form a 2-D image position to a line in 3-D space that is defined in terms of the vehiclecoordinate system. More...
 
struct  CrossControl::Datasheet
 Defines the characteristics of the camera. More...
 
struct  CrossControl::HistogramFormat
 Defines the histogram format used for a certain region of interest. More...
 
struct  CrossControl::VideoFormat
 Defines the parameter of the video format associated to certain region of interest link text ... . More...
 
struct  CrossControl::RegionOfInterest
 Defines the region of interest. The ROIs (regions of interest) are used to acquire data from the camera image using subscribe/notification mechanism. The data can be the image content of the region itself or a histogram of the region. ROIs are interpreted as an array of structures and referenced by its index (roiIndex). More...
 
struct  CrossControl::SomeIPHeader
 The sSomeIPHeader struct A struct containg the SOME/IP header data. More...
 
struct  CrossControl::SDEntryA
 The sSDEntryA struct A struct containing the Service Discovery Entry type A. More...
 
struct  CrossControl::IPv4Option
 The sIPv4Option struct Describes the IPv4EndpointOption. More...
 

Enumerations

enum  CrossControl::ServiceID : uint16_t { CrossControl::SOME_IP = 0x433f, CrossControl::SOME_IP_SD = 0xffff }
 The ServiceID enum Describes wether the message is a SOME/IP or SOME/IP Service Discovery Message. More...
 
enum  CrossControl::MethodID : uint16_t {
  CrossControl::GET_DATA_SHEET = 0x0001, CrossControl::GET_CAM_STATUS = 0x0002, CrossControl::SET_CAM_EXCLUSIVE = 0x0011, CrossControl::ERASE_CAM_EXCLUSIVE = 0x0019,
  CrossControl::SET_REGION_OF_INTEREST = 0x0101, CrossControl::GET_REGION_OF_INTEREST = 0x0103, CrossControl::GET_REGIONS_OF_INTEREST = 0x0104, CrossControl::ERASE_REGION_OF_INTEREST = 0x0109,
  CrossControl::GET_VIDEO_FORMAT = 0x0113, CrossControl::SUBSCRIBE_ROI_VIDEO = 0x0131, CrossControl::UNSUBSCRIBE_ROI_VIDEO = 0x0132, CrossControl::SET_CAM_CONTROL = 0x0201,
  CrossControl::GET_CAM_CONTROL = 0x0203, CrossControl::SET_CAM_REGISTER = 0x0301, CrossControl::SET_CAM_REGISTERS = 0x0302, CrossControl::GET_CAM_REGISTER = 0x0303,
  CrossControl::GET_CAM_REGISTERS = 0x304, CrossControl::SERVICE_DISCOVERY = 0x8100
}
 The MethodID enum Describes the different methods. More...
 
enum  CrossControl::ETHCamStatus {
  CrossControl::E_OK = 0x00, CrossControl::E_NOT_OK = 0x01, CrossControl::E_UNKNOWN_SERVICE = 0x02, CrossControl::E_UNKNOWN_METHOD = 0x03,
  CrossControl::E_NOT_READY = 0x04, CrossControl::E_NOT_REACHABLE = 0x05, CrossControl::E_TIMEOUT = 0x06, CrossControl::E_WRONG_PROTOCOL_VERSION = 0x07,
  CrossControl::E_WRONG_INTERFACE_VERSION = 0x08, CrossControl::E_MALFORMED_MESSAGE = 0x09, CrossControl::E_LOCKED_BY_FOREIGN_INSTANCE = 0x20, CrossControl::E_LOCK_EXPIRED = 0x21,
  CrossControl::E_NOT_LOCKED = 0x22, CrossControl::E_INVALID_PS_ENTRY = 0x24, CrossControl::E_INVALID_PS_OPERATION = 0x25, CrossControl::E_INVALID_PS_DATA = 0x26,
  CrossControl::E_NO_MORE_SPACE = 0x27, CrossControl::E_INVALID_ROI_INDEX = 0x30, CrossControl::E_INVALID_ROI_NUMBER = 0x31, CrossControl::E_INVALID_VIDEO_FORMAT = 0x32,
  CrossControl::E_INVALID_HISTOGRAM_FORMAT = 0x33, CrossControl::E_INVALID_CONTROL_INDEX = 0x35, CrossControl::E_INVALID_CONTROL_MODE = 0x36, CrossControl::E_INVALID_CONTROL_VALUE = 0x37,
  CrossControl::E_INVALID_REGISTER_ADDRESS = 0x38, CrossControl::E_INVALID_REGISTER_VALUE = 0x39, CrossControl::E_INVALID_REGISTER_OPERATION = 0x3a, CrossControl::E_SOCKET_ERR = 0x40,
  CrossControl::E_SOCKET_ERR_SEND = 0x41, CrossControl::E_NO_RESPONSE = 0x44
}
 Returncodes and error messages. Can be sent from either the camera or the API. More...
 
enum  CrossControl::MessageType : uint8_t {
  CrossControl::REQUEST = 0x00, CrossControl::REQUEST_NO_RETURN = 0x01, CrossControl::NOTIFICATION = 0x02, CrossControl::REQUEST_ACK = 0x40,
  CrossControl::REQUEST_NO_RETURN_ACK = 0x41, CrossControl::NOTIFICATION_ACK = 0x42, CrossControl::RESPONSE = 0x80, CrossControl::ERROR = 0x81,
  CrossControl::RESPONSE_ACK = 0xc0, CrossControl::ERROR_ACK = 0xc1
}
 The MessageType enum Describes what kind of intent a SOME/IP message has. More...
 
enum  CrossControl::EntryType : uint8_t {
  CrossControl::FIND_SERVICE = 0, CrossControl::OFFER_SERVICE = 1, CrossControl::REQUEST_SERVICE = 2, CrossControl::FIND_EVENTGROUP = 4,
  CrossControl::PUBLISH = 5, CrossControl::SUBSCRIBE_EVENTGROUP = 6, CrossControl::SUBSCRIBE_EVENTGROUP_ACK = 7
}
 The EntryType enum Describes what type of intent the Service Discovery Message has. More...
 
enum  CrossControl::OptionType : uint8_t {
  CrossControl::CONFIGURATION = 1, CrossControl::IPV4ENDPOINT = 4, CrossControl::IPV6ENDPOINT = 6, CrossControl::IPV4MULTICAST = 20,
  CrossControl::IPV6MULTICAST = 22
}
 The OptionType enum Describes different options sent by Service Discovery messages. More...
 
enum  CrossControl::L4Protocol : uint8_t { CrossControl::TCP = 6, CrossControl::UDP = 17 }
 The L4Protocol enum Desribes different internet data transmission protocols. More...
 
enum  CrossControl::ColorSpace : uint8_t {
  CrossControl::GRAYSCALE8 = 0, CrossControl::YUV411 = 1, CrossControl::YUV422 = 2, CrossControl::YUV444 = 3,
  CrossControl::RGB8 = 4, CrossControl::GRAYSCALE16 = 5, CrossControl::RGB16 = 6, CrossControl::SIGNED_GRAYSCALE16 = 7,
  CrossControl::SIGNED_RBG16 = 8, CrossControl::RAW8 = 9, CrossControl::RAW16 = 10, CrossControl::GRAYSCALE12 = 11,
  CrossControl::RAW12 = 12
}
 The ColorSpace enum. Vendor codes starting at 128 can be used for specific codec profiles. More...
 
enum  CrossControl::ControlSupportMode : uint8_t {
  CrossControl::STAT_NOT_SUPORTED = 0, CrossControl::STAT_RW_NA_NO = 1, CrossControl::STAT_RO_NA_NO = 3, CrossControl::STAT_RO_A_NO = 5,
  CrossControl::STAT_RW_A_NO = 7, CrossControl::STAT_RO_NA_O = 9, CrossControl::STAT_RW_NA_O = 11, CrossControl::STAT_RO_A_O = 13,
  CrossControl::STAT_RW_A_O = 15
}
 Defines the valid values for the supported modes of operation of camera controls. More...
 
enum  CrossControl::ControlMode : uint8_t { CrossControl::MODE_MANUAL = 2, CrossControl::MODE_MANUAL_MODIFIED = 3, CrossControl::MODE_AUTO = 4, CrossControl::MODE_ONE_PUSH = 5 }
 Is used to set the mode of operation of a certain camera control. More...
 
enum  CrossControl::VideoCompression : uint8_t { CrossControl::UNCOMPRESSED = 0, CrossControl::JPEG = 1, CrossControl::H264 = 2 }
 Enum that describes the different types of video compressions that can used. Vendor codes starting at 128 can be used for specific codec profiles. More...
 

Detailed Description

Contains the datatypes, structures and enums that are used the API

Enumeration Type Documentation

enum CrossControl::ColorSpace : uint8_t

The ColorSpace enum. Vendor codes starting at 128 can be used for specific codec profiles.

Enumerator
GRAYSCALE8 

ID for colorspace Grayscale8

YUV411 

ID for colorspace YUV411

YUV422 

ID for colorspace YUV422

YUV444 

ID for colorspace YUV444

RGB8 

ID for colorspace RGB8

GRAYSCALE16 

ID for colorspace GRAYSCALE16

RGB16 

ID for colorspace RGB16

SIGNED_GRAYSCALE16 

ID for colorspace SIGNED GRAYSCALE16

SIGNED_RBG16 

ID for colorspace SIGNED RBG16

RAW8 

ID for colorspace RAW8

RAW16 

ID for colorspace RAW16

GRAYSCALE12 

ID for colorspace GRAYSCALE12

RAW12 

ID for colorspace RAW12

enum CrossControl::ControlMode : uint8_t

Is used to set the mode of operation of a certain camera control.

Enumerator
MODE_MANUAL 

Manual mode, value not modified

MODE_MANUAL_MODIFIED 

Manual mode, value modified

MODE_AUTO 

Continuous automatic mode

MODE_ONE_PUSH 

onePush automatic mode

Defines the valid values for the supported modes of operation of camera controls.

Enumerator
STAT_NOT_SUPORTED 

Control not supported

STAT_RW_NA_NO 

Read/write, no continuous automatic, no OnePush automatic

STAT_RO_NA_NO 

Read only, no continuous automatic, no OnePush automatic

STAT_RO_A_NO 

Read only, continuous automatic, no OnePush automatic

STAT_RW_A_NO 

Read/write, continuous automatic, no OnePush automatic

STAT_RO_NA_O 

Read only, no continuous automatic, OnePush automatic

STAT_RW_NA_O 

Read/write, no continuous automatic, OnePush automatic

STAT_RO_A_O 

Read only, continuous automatic, OnePush automatic

STAT_RW_A_O 

Read/write, continuous automatic, OnePush automatic

enum CrossControl::EntryType : uint8_t

The EntryType enum Describes what type of intent the Service Discovery Message has.

Enumerator
FIND_SERVICE 

The service discover message is looking for a service

OFFER_SERVICE 

The service discover message is offering a service

REQUEST_SERVICE 

The service discover message is requesting a service

FIND_EVENTGROUP 

The service discover message is looking for a eventgroup

PUBLISH 

The service discover message is publishing a eventgroup

SUBSCRIBE_EVENTGROUP 

The service discover message is subscribing to a eventgroup

SUBSCRIBE_EVENTGROUP_ACK 

The service discover message is an acknowledgment for a eventgroup subscription

Returncodes and error messages. Can be sent from either the camera or the API.

Enumerator
E_OK 

No error occurred

E_NOT_OK 

An unspecified error occurred

E_UNKNOWN_SERVICE 

The requested Service ID is unkown

E_UNKNOWN_METHOD 

The requested Method ID is unkown. Service ID is know

E_NOT_READY 

Service ID and Method ID are known. Application not running

E_NOT_REACHABLE 

System running the service is not reachable

E_TIMEOUT 

A timeout occurred

E_WRONG_PROTOCOL_VERSION 

Version of SOME/IP protocol not supported

E_WRONG_INTERFACE_VERSION 

Interface version mismatch

E_MALFORMED_MESSAGE 

Deserialization error (i.e. length or type incorrect)

E_LOCKED_BY_FOREIGN_INSTANCE 

Camera service is already locked by another client

E_LOCK_EXPIRED 

The camera lock has expired

E_NOT_LOCKED 

Camera is not locked

E_INVALID_PS_ENTRY 

The requested PSE ID is unknown

E_INVALID_PS_OPERATION 

The requested PSE operation is not allowed, e.g. store on a RO PSE

E_INVALID_PS_DATA 

The PSE contains a CRC16 error

E_NO_MORE_SPACE 

No more space available to store the PSE

E_INVALID_ROI_INDEX 

The requested ROI is out of range

E_INVALID_ROI_NUMBER 

The requested number of ROIs is out of range, defined by Datasheet.numRegionsOfInterest

E_INVALID_VIDEO_FORMAT 

Invalid value in video format

E_INVALID_HISTOGRAM_FORMAT 

Invalid value in histogram format

E_INVALID_CONTROL_INDEX 

The requested camControlIndex is out of range or not supported by the camera

E_INVALID_CONTROL_MODE 

The requested control mode is not supported by the camera

E_INVALID_CONTROL_VALUE 

The requested control value is out of the range, defined in CamControl

E_INVALID_REGISTER_ADDRESS 

The register address is not supported by the imager

E_INVALID_REGISTER_VALUE 

The value for the given register address is not supported by the imager

E_INVALID_REGISTER_OPERATION 

The requested operation (read or write) for the given register address is not supported by the imager

E_SOCKET_ERR 

There was an unspecified socket error

E_SOCKET_ERR_SEND 

There was an error on writing to the socket

E_NO_RESPONSE 

There was no matching message in the socket

enum CrossControl::L4Protocol : uint8_t

The L4Protocol enum Desribes different internet data transmission protocols.

Enumerator
TCP 

TCP protocol

UDP 

UDP protocol

enum CrossControl::MessageType : uint8_t

The MessageType enum Describes what kind of intent a SOME/IP message has.

Enumerator
REQUEST 

A request expection a response

REQUEST_NO_RETURN 

A fire and forget request

NOTIFICATION 

A notification/event callback expection no response

REQUEST_ACK 

Acknowledgment for REQUEST

REQUEST_NO_RETURN_ACK 

Acknowledgement for REQUEST_NO_RETURN_ACK

NOTIFICATION_ACK 

Acknowledgement for NOTIFICATION

RESPONSE 

The response message

ERROR 

The response contains an error

RESPONSE_ACK 

Acknowledgement for RESPONSE

ERROR_ACK 

Acknowledgement for ERROR

enum CrossControl::MethodID : uint16_t

The MethodID enum Describes the different methods.

Enumerator
GET_DATA_SHEET 

ID for method Get Data Sheet

GET_CAM_STATUS 

ID for method Get Cam Status

SET_CAM_EXCLUSIVE 

ID for method Set Cam Exclusive

ERASE_CAM_EXCLUSIVE 

ID for method Erase Cam Exclusive

SET_REGION_OF_INTEREST 

ID for method Set Region of Interest

GET_REGION_OF_INTEREST 

ID for method Get Region of Interest

GET_REGIONS_OF_INTEREST 

ID for method Get Regions of Interest

ERASE_REGION_OF_INTEREST 

ID for method Erase Region of Interest

GET_VIDEO_FORMAT 

ID for method Get Video Format

SUBSCRIBE_ROI_VIDEO 

ID for method Subscribe ROI Video

UNSUBSCRIBE_ROI_VIDEO 

ID for method Unsubscribe ROI Video

SET_CAM_CONTROL 

ID for method Set Cam Control

GET_CAM_CONTROL 

ID for method Get Cam Control

SET_CAM_REGISTER 

ID for method Set Cam Register

SET_CAM_REGISTERS 

ID for method Set Cam Registers

GET_CAM_REGISTER 

ID for method Get Cam Register

GET_CAM_REGISTERS 

ID for method Get Cam Registers

SERVICE_DISCOVERY 

ID for method Service Discovery

enum CrossControl::OptionType : uint8_t

The OptionType enum Describes different options sent by Service Discovery messages.

Enumerator
CONFIGURATION 

The operation is a configuration type

IPV4ENDPOINT 

The operation is a IPv4 endpoint type

IPV6ENDPOINT 

The operation is a IPv6 endpoint type

IPV4MULTICAST 

The operation is a IPv4 multicast type

IPV6MULTICAST 

The operation is a IPv6 multicast type

enum CrossControl::ServiceID : uint16_t

The ServiceID enum Describes wether the message is a SOME/IP or SOME/IP Service Discovery Message.

Enumerator
SOME_IP 

ID for Some/IP

SOME_IP_SD 

ID for Some/IP Service Discovery

Enum that describes the different types of video compressions that can used. Vendor codes starting at 128 can be used for specific codec profiles.

Enumerator
UNCOMPRESSED 

No compression

JPEG 

JPEG compression

H264 

H264 compression