Appendix 1 - CleO Commands

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Appendix 1 - CleO Commands

This section contains the summary of CleO commands categorized under the respective group. Click on the link (wherever applicable) to know the command usage.

Command

Command Structure

Description

Return Type

Main Commands

Noop


No Operation for this command

int16_t

Echo


Echo back

int16_t

Version


Version number of CleO solution

int16_t

ModuleIdentifier


CleO Module identifier string

int16_t

UnitIdentifier


Unique 64 bit ID

int16_t





Graphics Primitives

String

String

X, Y, String

A string is a data type used in programmings, such as an integer and floating point unit, but is used to represent text rather than numbers.This command draws a string at coordinate x,y

int16_t

StringExt

Handle X, Y, Color, Justification, Angle, Radius, String

All the parameters on string functionality are taken as arguments

int16_t

StringColor

argb

Color of the string

int16_t

StringJustification

Justification

9 combinations (TL,TM,TR,ML,MM,MR,BL,BM,BB). The Default justification is MM

int16_t

StringAngle

Angle

Angle in degree or furmans. Angle starts from bottom and increments clockwise direction.

int16_t

StringRadius

Radius

Distance from x,y to string's justification

int16_t

StringHandle

Handle

Handle used by String command

int16_t





Bitmaps

Bitmap

Handle, X, Y

A bitmap is an image file format used to store digital images. This command draws a bitmap at x,y location

int16_t

BitmapExt

Handle X, Y, Color, Justification, Angle, Radius, Transform

All the parameters on the bitmap functionality are taken as arguments

int16_t

BitmapColor

argb

Color of the bitmap

int16_t

BitmapJustification

Justification

9 combinations (TL,TM,TR,ML,MM,MR,BL,BM,BB). The Default justification is TL

int16_t

BitmapAngle

Angle

Angle in degree or Furmans.

int16_t

BitmapRadius

Radius

Distance from x,y to bitmap's justification

int16_t

BitmapTransform

Scale, Rotate, Translate

Parameters are in Furmans

int16_t





Line

Line

x1,y1,x2,y2

This command draws a line from x1,y1 till x2,y2

int16_t

LineXY

X,Y,Length

Line with justification and length

int16_t

LineExt

x,y,length,color,angle,radius

All the parameters on the line functionality are taken as arguments

int16_t

LineR1R2

x,y,radius1,radius2,angle

This command draws a line segment at x, y, centered, starting from radius1 till radius 2 with angle

int16_t

LineColor

argb

Color of the line

int16_t

LineWidth

Width

Thickness of the line

int16_t

LineAngle

Angle

Angle in degrees or Furmans

int16_t

LineRadius

Radius

Distance from x,y to line justification

int16_t





Points

Point

x,y

A point is an exact position or location on a plane surface. This command draws a point at x,y co-ordinate

int16_t

PointExt

x,y,radius,color,angle,radiusat

All the parameters on the point functionality are taken as arguments; center justified

int16_t

PointRadius

Radius

Diameter of the point

int16_t

PointAngle

Angle

Point drew at an angle with radius from x,y

int16_t

PointAtRadius

Radius

Distance from x,y to point justification

int16_t

PointColor

argb

Color of the point

int16_t





Circles

Circle

x,y

A circle is the locus of points equidistant from a given time the center of the circle. This command draws a circle at xy with opaque from r1 till r2

int16_t

CircleExt

x,y,radius1,radius2,color,justification,angle,radiusat

All the parameters on the circle functionality are taken as arguments

int16_t

CircleR1R2

radius1,radius2

Diameter of the circle

int16_t

CircleAngle

Angle

Circle drew at angle

int16_t

CircleAtRadius

Radiusat

Distance from x,y to circle justification

int16_t

CircleColor

argb

Color of the circle

int16_t

CircleJustification

Justification

9 combinations (TL,TM,TR,ML,MM,MR,BL,BM,BB). The default justification is MM

int16_t





Rectangle

RectangleXY

x,y,width,height

A rectangle is a quadrilateral with four right angles. This command draws a rectangle at x,y with width and height on justification, angle, radius

int16_t

RectangleExt

x,y,width,height,color,justification,angle,radius

All the parameters on the rectangle functionality are taken as arguments

int16_t

RectangleColor

argb

Color of the rectangle

int16_t

RectangleAngle

Angle

Angle in degrees or Furmans

int16_t

RectangleRadius

Radius

Distance from x,y till rectangle justification

int16_t

RectangleJustification

Justification

9 combinations (TL,TM,TR,ML,MM,MR,BL,BM,BB). The default justification is MM

int16_t

RectangleCorner

Radius

Justification is for the whole rectangle

int16_t





Needle

Needle

x1,y1,x2,y2

This command draws a need from x1,y1 till x2,y2

int16_t

NeedleXY

x,y,length,angle

Needle with length and angle

int16_t

NeedleExt

x,y,length,color,angle,radius

All the parameters for the needle functionality are taken as arguments

int16_t

NeedleR1R2

x,y,radius1,radius2,angle

A needle is drawn at x, y, centered, starting from radius1 till radius2 with angle

int16_t

NeedleColor

argb

Color of the needle

int16_t

NeedleWidth

width

Thickness of the needle

int16_t





Graphics Context

SetBackgroundcolor

argb

Color of the background

int16_t

SetBackgroundGradient

x1,y1,x2,y2,rgb1,rgb2

Gradient is drawn from x1y1 till x2y2

int16_t

SetBackgroundImage

handle,mode


int16_t

SetBackgroundVideo

FileName,Looping


int16_t

SetAngleType

AngleType

Angle in degrees or furmans

int16_t

SetDefaultContext


All the context parameters are set to default

int16_t

Scissor

x,y,width,height

Crops the image starting from x,y till width and height

int16_t





Screen Control

Start


Starts a new screenshot

int16_t

Show


Renders the constructed screenshot

int16_t





Audio Primitives

Sound

sound

Play audio type

int16_t

SoundExt

sound,pitch,volume,duration

Play sound with midi type, pitch, volume, and duration

int16_t

SoundVol

volume


int16_t

SoundDuration

duration


int16_t

SetSound

sound,pitch,volume,duration

Sets the parameters without playing

int16_t

SoundPlay

play

Plays or stops the sound

int16_t

AudioPlay

play, mode

Starts playing the audio file in continuous mode

int16_t

AudioStop



int16_t

MPlay

Instrument,Delay,String

Plays a sequence of notes

int16_t





Video Primitives

VideoPlay

handle, play

Continuous playback of Avi file; video will be played till the end of the file; no new graphics/audio commands are executed; play and stop in the same argument


GetVideoProperties

handle,options

Returns video duration with height,bitrate,audio format,sampling frequency


VideoPlayFrame

handle

Video is played frame by frame till the end of file is encountered






Touch Primitives

Tag

Tag

Tag the primitives

int16_t

EnableTag

Enable

Enable or disable tag tracking

int16_t

TouchCoordinates

&touchx,&touchy,&touchdur,&touchtag

x,y,duration,tagvalue

int16_t





Utilities

ColorPicker

prompt,#argb

Utility to get the color selected

int16_t

SetDateTime

#epoch

Rotary utility to set the date time

int16_t

Keyboard

prompt,#AlphaNumeric

Keyboard for users to input characters

int16_t

KeyPad

prompt, Numeric

Keypad for users to input numbers

int16_t

CaptureScreen

Handle,x,y,width,height

Directly save into file, data gets appended in case of existing file; Single frame in a bmp

int16_t

LoadFont

FileName

Loads custom font from flash/sd card into object memory; Font table, bitmap raw data are present in the file in the form compressed data

int16_t

LoadImageFile

FileName,Format

Loads an image into object memory and returns a handle

int16_t

LoadIcon

FileName,Index

Loads an icon from the icons file

int16_t

Sketch

x,y,width,height,format

Sketch is tracked and drawn at x,y location width x height dimension; Returns handle

int16_t

LoadAudioFile

FileName

Loads an audio file; allocates object memory for the audio data; return a handle

int16_t

LoadVideoFile

FileName

Loads the video playback filed; allocates file/EVE resources and returns a handle

int16_t

Free

Handle

Handle number to free up image, file, audio file, video file, etc.

int16_t

Calibration


Used for calibrating the touch screen

int16_t

EpochToDate

epoch,&year,&mon,&mday,&hour,&mins,&sec,&wday

Converts Epoch format to date/time format. The month starts from 0.

int16_t

DateToEpoch

&epoch,year,mon,mday,hour,mins,sec

Convert Date/Time format to epoch time

int16_t

CRCScreen

&crc32

Computes image CRC for the current screen

int16_t

SetErrorTrap

Enable

Enable or disable error trap

int16_t





DeviceControl

Display

On

0 is off, 255 is maximum brightness

int16_t

DisplayRotate

rotation, flip

Rotation off screen

int16_t

CameraLEDS

On

0 is off, 255 is maximum brightness

int16_t





File Operations

FOpen

string, mode

No special characters such as @$& are allowed; Files in Flash will contain @ as the starting character; String name gives the whole path (for ex: @TestD1\TestD2\TestF.txt

int16_t

FClose

handle


int16_t

FRead

handle, buffer, bytestoread, bytesread

Number of bytes read

int16_t

FWrite

handle, bytestowrite, buffer, &byteswritten


int16_t

FSeek

handle, offset

Offset is the absolute value from starting address

int16_t

FGetS

handle,buffer,length


int16_t

FPutS

handle, string


int16_t

FGetC



int16_t

FPutC

handle,character


int16_t

FTell

handle,&offset

Returns the current offset of the file pointer

int16_t

FEOF

handle

Returns whether end of file are reached or not

int16_t

FSize

handle,&offset

Returns file size, 32 bit

int16_t

InternalEFlashUpdate

handle, code


int16_t





EVE Widgets

Widget Context

FGColor

rgb

Widget's foreground color

int16_t

BGColor

rgb

Widget's background color for layer 0

int16_t

GradColor

rgb

Gradient color for buttons, keys

int16_t





Widgets

Button

x,y,w,h,font,options,string

Options are EVE options; Null terminated string; Font handle from loadfont

int16_t

Clock

x,y,r,options,h,m,s,ms

Options are EVE options

int16_t

Gauge

x,y,r,options,major,minor,val,range

Options are EVE options

int16_t

Keys

x,y,w,h,font,options,string

Options are EVE options; Null terminated string; Font handle from loadfont; Tags assigned with string character values.

int16_t

Progress bar

x,y,w,h,options,value,range

Options are EVE options

int16_t

Scrollbar

x,y,w,h,options,value,size,range

Options are EVE options

int16_t

Slider

x,y,w,h,options,value,range

Options are EVE options

int16_t

Dial

x,y,options,value

Options are EVE options

int16_t

Text

x,y,font,options,string

Options are EVE options; Null terminated string; Font handle from loadfont

int16_t

Toggle

x,y,w,font,options,string

Options are EVE options; Two null terminated string contiguous; Font handle from loadfont;height is automatically derived from font

int16_t

ColdStart



int16_t

Number

x,y,font,options,n







Bridging

DeviceOpen

Slot,Interface,bytestowrite,Buffer

Command to obtain a communication handle for one of SPI, I2C, UART, GPIO, PWM and ADC

int16_t

DeviceRead

DevHandle,bytestowrite,bytestoread,Buffer,rBuffer

Command to read the hardware interface using the handle

int16_t

DeviceWrite

DevHandle,bytestowrite,Buffer,&byteswritten

Command to write the hardware interface using the handle

int16_t

DeviceIOCtrl

DevHandle,bytestowrite,bytestoread,Buffer,rBuffer

Currently not supported


DeviceClose

DevHandle

Command to close the communication using the handle

int16_t





Application

Player

PlayerPlay

Play


int16_t

SetPlayerProperties




GetPlayerProperties


File properties that are sent out - Play or Pause or Stop


PlayerExit



int16_t





Recorder

SetRecorderProperties

FileName

Sets the properties of record, file name for record, etc

int16_t

GetRecorderProperties



int16_t

RecorderPreview



int16_t

RecorderRecord

Start

Start or Pause or Stop

int16_t

RecorderCapture

NumofPictures

Capture Frame/Frames and create jpg files in SD Card

int16_t