2. Interfaces

This section covers basic information on how to access the device hardware. Most of the hardware is accessed using the default Linux interfaces but some specific interfaces may require additional functions to be accessed.

Table 1 lists the API used to access each interface. These interfaces can be grouped into two categories; Standard operating system libraries (Std. API) and CCAux Library (CCAux API).

See also the operating system specific sections and additional documentation describing the software API.

Table 1: APIs used for different interfaces in CCpilot devices

Functionality

Std. API

CCAux API

Comment

CAN

SocketCAN available through Linux.

Ethernet

Standard Linux kernel drivers.

USB

Standard Linux kernel drivers.

RS232

Standard Linux kernel drivers.

RS485

Standard Linux kernel drivers.

Digital video

QtMultimedia, gstreamer

Analog video in

Video4Linux2 API, gstreamer, and QtMultimedia can be used directly without CCAux API.

Digital output

PWM output

Configurable input

Analog input

Status indicator

Backlight

Ambient light sensor

Buzzer

Power management

On CCpilot VI the video stream needs to be rotated counter clockwise due to display orientation. This can be done by setting the videoflip method to counterclockwise in the gstreamer pipeline.

Your device might not support all interfaces stated here. See the Product Leaflet or Technical Manual of your device for a complete list of available interfaces.

2.1 Standard libraries

Most interfaces are accessed using standard libraries and access methods. Various access methods are possible to be used depending on the development environment and additional installed frameworks.

The standard libraries used for Linux are described in their respective documentation sources, such as MAN pages.

2.2 CCAux library

The CCAux API gives access to several hardware specific interfaces. The API functions of this library are documented in the CCAux API documentation.

Table 2 gives a brief introduction on the API’s found therein and their functions. Most API functions can be used from the pre-installed CCSettingsConsole application as well.

Table 2: Short description of CCAux API contents and the supported devices

API

Description

X900

V700

V1x00

Vx10

Yukon

X1200

About

Hardware information API related to the hardware configurations.

Yes

Yes

Yes

Yes

Yes

Yes

Adc

Read built in ADC voltage information.

Yes

Yes

Yes

Yes

Yes

Yes

AuxVersion

Read firmware version information.

Yes

Yes

Yes

Yes

Yes

Yes

Backlight

Control display backlight settings and configure automatic backlight functionality.

Yes

Yes

Yes

Yes

Yes

Yes

Battery

Control battery related settings, if a battery is connected.

No

No

No

No

No

No

Buzzer

Control the built-in buzzer.

Yes

Yes

Yes

Yes

Yes

Yes

CanSetting

Control CAN settings.

Yes

Yes

Yes

Yes

Yes

Yes

CfgIn

Get/set state of configurable input signals.

No

No

No

Yes

Yes

No

Config

Control internal and external power up and power down settings and time configurations, including power button and on/off signal configurations.

Yes

Yes

Yes

Yes

Yes

Yes

Diagnostic

Get run time information about the device.

Yes

Yes

Yes

Yes

Yes

Yes

DigIO

Get/set state of Digital Output signals.

No

No

No

No

No

No

Firmware-Update

Update/verify System Supervisor (SS) and other firmware.

Yes

Yes

Yes

Yes

Yes

Yes

FrontLED

Override the default LED behavior.

Yes

Yes

Yes

Yes

Yes

Yes

LightSensor

Read the light sensor values and get raw and/or calculated values.

Yes

Yes

Yes

Yes

Yes

Yes

Power

Read power status and control functions for advanced shut down behavior.

Yes

Yes

Yes

Yes

Yes

Yes

PWMOut

Get/set state and settings of PWM Output signals.

No

No

No

Yes

Yes

No

SoftKey

Get press status of buttons. Get/set button backlight settings.

No

No

No

No

No

No

Video

Control the analog video streams in terms of channel, size, scaling etc.

No

No

No

No

No

No

Button

Configure the buttons on the side of the display and their LEDs

No

No

No

Yes

Yes

Yes

1 Most settings for CAN usage are available over the SocketCAN interface.

2 Consider careful usage for these functions, erroneous usage can result in a non-functional device.

2.3 CCAux API calling convention

The standard way to call CCAux API functions is shown below. Please adhere to this calling convention. Example code snippets for each function are available in the CCAux API documentation. Moreover, chapter 6.1 gives an example on how to call the CCAux API in order to set the front LED color.

/* Usage in CCAux API 2.x */
#include “Module.h”

MODULEHANDLE pModule = CrossControl::GetModule();

eErr err = Module_function_1(pModule, arg, …);

Module_release(pModule);