background image

QuercusVL Programming Manual

in digital inputs is enabled; false, disabled.

4.7.8. DetectorTasksQuery

Query to receive the status of the tasks a detector must perform.

Query

Type: 39

Message Data: 

Id: detector's identifier.

Answer

Type: 71

Message Data: 

DetectorId: detector's identifier.

AreSummariesEnabled (SmE): if true, the generation of summaries at the unit is 
enabled; false disabled.

AreIncidencesEnabled (InE): if true, the generation of incidences at the unit is 
enabled; false disabled.

SendSummaries (SSm): if true, sending the summaries generated at the unit to 
the central system is enabled, false disabled.

SendIncidences (SIn): if  true, sending the incidences generated at the unit to 
the central system is enabled, false disabled.

SendRealTimeInformation (SRT): if true, sending the real time events generated 
at the unit to the central system is enabled, false disabled.

4.7.9. DetectorsCountQuery

Query to obtain the number of configured detectors in the unit.

Quercus Technologies

150

4

DetectorId

4

DetectorId

1

SmE

1

InE

1

SSm

1

SIn

1

SRT

4

DetectorId

Summary of Contents for SmartLoop TS

Page 1: ...Software version 1 5 x Firmware version 1 5 x www quercus biz www quercus technologies com www quercus com br Quercus Technologies PROGRAMMING MANUAL PROGRAMMING MANUAL...

Page 2: ...d under a license and can be solely used for the purposes described in the license The contents of this manual are provided for information purposes only and can be modified with no prior warning The...

Page 3: ...ompatibility between QuercusVL products 24 3 2 Hierarchy 26 3 3 Classes 27 3 4 System Class 27 3 4 1 Properties 27 3 4 2 Methods 28 3 4 3 Events 29 3 5 Units Class 30 3 5 1 Properties 30 3 6 Unit Clas...

Page 4: ...1 Properties 50 3 17 TrafficLight Class 51 3 17 1 Properties 51 3 17 2 Methods 52 3 18 HistoricIncidences Class 53 3 18 1 Properties 53 3 18 2 Methods 53 3 19 HistoricSummaries Class 55 3 19 1 Proper...

Page 5: ...3 29 1 Properties 72 3 29 2 Methods 77 3 30 SpeedsDistribution Class 77 3 30 1 Properties 77 3 31 LengthsDistribution Class 78 3 31 1 Properties 78 3 32 OccupationsDistribution Class 79 3 32 1 Proper...

Page 6: ...05 3 44 1 Properties 105 3 45 ConfigurationOutputActuator class 108 3 45 1 Properties 108 3 45 2 Methods 110 3 46 ConfigurationOutputActuatorConditions class 110 3 46 1 Methods 110 3 47 ConfigurationO...

Page 7: ...ype 124 3 62 VLConditionOperatorType Type 125 4 Communications protocol 126 4 1 Message format 127 4 2 Message version 128 4 3 Compatibility between QuercusVL products 130 4 4 Initial concepts 132 4 4...

Page 8: ...atusQuery 146 4 7 4 IOQuery 147 4 7 5 ImageQuery 147 4 7 6 SnapshotQuery 148 4 7 7 UnitTasksQuery 150 4 7 8 DetectorTasksQuery 151 4 7 9 DetectorsCountQuery 151 4 7 10 DetectorInformationQuery 152 4 7...

Page 9: ...Changes 168 4 9 16 DiscardChanges 169 4 9 17 Restart 169 4 9 18 GetEntriesCount 170 4 9 19 GetEntry 171 4 9 20 SetEntry 171 4 9 21 RestoreEntry 172 4 9 22 GetDetectorsCount 172 4 9 23 RemoveDetector 1...

Page 10: ...ctor 189 5 1 6 TrafficLight 190 5 1 7 RedLightDetector 190 5 1 8 StoppedCarDetector 192 5 2 Event messages 193 5 2 1 IncidenceInformation 193 5 3 Query messages 193 5 3 1 SnapshotQuery 193 5 3 2 Detec...

Page 11: ...le 205 7 1 2 Detectors configuration file 206 7 1 2 1 Globals section 206 7 1 2 2 DetectorX section 207 7 1 2 3 TrafficLight_X section 208 7 1 2 4 LightX_Y section 208 7 2 Simulation configuration 208...

Page 12: ...summary 217 8 1 1 3 Speed summary 219 8 1 1 4 Red light incidence 221 8 1 1 5 Stopped car incidence 223 8 1 2 JPEG file 226 8 1 3 AVI file 226 8 2 Protocol encryption 226 8 2 1 Encryption format 227 8...

Page 13: ...VL family products which SmartLoop and BirdWatch belong to Although they have different functionalities booth of them are based on virtual loop technology As a result they use the same protocol of com...

Page 14: ...stems Function library in C Dynamically linked library for Windows and GNU Linux that provides an object oriented vision to functions of the system As in the case of the C library the source code of a...

Page 15: ...a dynamically linked library which includes all the functionalities of the system We must take into account that even though there are different layers in the system they do not add any noticeable ove...

Page 16: ...he corresponding method OnRealTimeInformation in this case Take into account that these methods will be called from execution threads which are different from the main one so code that is not safe abo...

Page 17: ...inc get_Video get_Duration inc get_Video get_Framerate else printf Video NOT FOUND n virtual void OnSummary Summary sum printf OnSummary d d sum get_Unit get_Id sum get_DetectorId switch sum get_Detec...

Page 18: ...ng with units configured at initialization file Central ini The file Central log stores system logs As you can see the previously created object CEventHandler is passed to the library as a parameter s...

Page 19: ...function returns it would call the object s copy destructor and this is dangerous specially if the object internally contains pointers In VL library all these caveats have been solved as the object s...

Page 20: ...tion directory Copyright C 2011 Quercus Technologies All rights reserved include stdio h include VLWrapperC h typedef enum DT_ALL 0 DT_SPEED 1 DT_QUEUE 2 DT_PRESENCE 3 DT_RED_LIGHT 4 DT_STOPPED_CAR 5...

Page 21: ...void __stdcall OnSummary int sum Implementation of client code that will run with the events The functions must have exactly the same format defined at header file VLWrapperC h otherwise will fail at...

Page 22: ...on Class_Release must be called see Release method The parameter h is a handler of the class Release C void Class_Release int h The function decreases a reference to the object and frees the allocated...

Page 23: ...folder Set CApi_Basic as active project Build the executable Linux Open a console Go to folder Samples CApi_Basic Type make command 2 3 Other examples At Installation folder Samples you will find more...

Page 24: ...oducts so there are parts in it functions classes events not applicable to every product The following table describes classes events and types useful for each unit type SmartLoop TS SmartLoop TS Plus...

Page 25: ...igurationDetector ConfigurationPresenceDetector ConfigurationQueueDetector ConfigurationSpeedDetector ConfigurationRedLightDetector ConfigurationStoppedCarDetector ConfigurationTrafficLight Configurat...

Page 26: ...l traffic light Summary the logical representation of a summary Incidence the logical representation of an incidence Take into account that for every modification in the configuration of a unit the hi...

Page 27: ...the same VL_Detector_Release detector Releasing the detector 3 3 Classes In C and C you need to call VLLoad function to load the library before any other call and VLUnload at the end of program execu...

Page 28: ...H systemEH C int VL_System_Initialize const char iniFile const char logFile VL_ISYSTEMEH_ONREALTIMEINFORMATION VL_ISYSTEMEH_ONINCIDENCE VL_ISYSTEMEH_ONSUMMARY VL_ISYSTEMEH_ONNOTIFICATION VL_ISYSTEMEH_...

Page 29: ...f the function scope VL_RealTimeInformation_AddRef should be called to add a reference see method AddRef from RealTimeInformation class and VL_RealTimeInformation_Release to remove the reference and f...

Page 30: ...real time event The parameter hNotification receives event data check Notification class In C the parameter hNotification is a handler of Notification In C and C the parameter Notification is only va...

Page 31: ...from zero Id C Unit Id int id C Does not exist check VL_System_get_Units_Id from System Returns the unit with identifier id specified inside the units collection If there is no unit with such identif...

Page 32: ...ess to collection properties int VL_Unit_get_Detectors_Count int h returns the number of detectors in unit h int VL_Unit_get_Detectors_Item int h int item returns the detector located at the indicated...

Page 33: ...icLight_Release must be called to free allocated memory see Release method at TrafficLight class int VL_Unit_get_TrafficLights_Id int h int id returns the TrafficLight identified by id inside the Traf...

Page 34: ...int numRedLights int redLights int inputValues int outputValues C int VL_Unit_GetSnapshot int h int roiRight int roiTop int roiLeft int roiBottom int exposureTime int zoom int maxSize unsigned char pI...

Page 35: ...camera exposure time for the snapshot bool zoom indicates if the obtained image must be captured by the unit false or a magnified one true int maxSize sets the size of the pImageData buffer This is a...

Page 36: ...ctivateOutput int bit int time C int VL_Unit_ActivateOutput int h int bit int time Enables the digital output bit for the time specified in milliseconds In C the parameter h is a handler of unit Unit...

Page 37: ...nitTasks int h int sendInputChanges Sets the status of unit tasks The unit will inform the central system about the changes in digital inputs if sendInputChanges is true if false not Returns true if t...

Page 38: ...imeInformation Informs about the status of the indicated id detector tasks Returns true if the query was successful or false otherwise In C the parameter h is a handler of unit Unit 3 7 UnitStatus Cla...

Page 39: ...ersionInformation_get_Major int h Informs about the Major value of the version In C the parameter h is a handler of version VersionInformation Minor C int get_Minor C int VL_VersionInformation_get_Min...

Page 40: ...ero If there is no Detector for the specified position returns an invalid one see IsValid from Detector class Id C Detector Id int id C Does not exist check VL_Unit_get_Detectors_Id int h int id of Un...

Page 41: ...C int VL_Detector_get_AreIncidencesEnabled int h Returns true if the generation of incidences is enabled false if disabled In C the parameter h is a handler of detector Detector AreSummariesEnabled C...

Page 42: ...int VL_Detector_get_SummariesPeriod int h Returns the summaries period setting in minutes In C the parameter h is a handler of detector Detector Coordinates C Region get_Coordinates C int VL_Detector...

Page 43: ...about a detector and false if invalid Some methods may sometimes return void Detectors In C this behaviour is detected as its value will be 0 In C however this method is necessary because the object a...

Page 44: ...as implemented the assignment operator to use a generic detector as a queue detector Example in C if detector get_Type DT_QUEUE QueueDetector myQueueDetector myQueueDetector detector assignment operat...

Page 45: ...or Distance C int get_Distance C int VL_SpeedDetector_get_Distance int h Returns the distance from the camera to the detector in millimetres In C the parameter h is a handler of detector SpeedDetector...

Page 46: ...eturns true if the detector is enabled to calculate the metrics In C the parameter h is a handler of detector RedLightDetector Distance C int get_Distance C int VL_RedLightDetector_get_Distance int h...

Page 47: ...RedInput int h Returns the identifier of the digital input used for the red state sign If no input has been configured but a traffic light see TrafficLightId from RedLightDetector it will return 1 In...

Page 48: ...LastPictureDelayTimeMs C int get_LastPictureDelayTimeMs C int VL_RedLightDetector_get_LastPictureDelayTimeMs int h Returns the time that the last picture of incidence will be delayed in miliseconds In...

Page 49: ...al If no traffic light is configured but a digital input check RedInput from StoppedCarDetector it will return 1 In C the parameter h is a handler of detector StoppedCarDetector RedInput C int get_Red...

Page 50: ...ndler of detector StoppedCarDetector 3 16 TrafficLights Class Collection of configured traffic lights in a unit 3 16 1 Properties Count C int Count C Does not exist check VL_Unit_get_TrafficLights_Cou...

Page 51: ...d in a traffic light will be defined in a 5 megapixel image from 0 to 2559 and from 0 to 1919 3 17 1 Properties UnitId C Unit get_Unit C int VL_TrafficLight_get_UnitId int h Returns the unit where the...

Page 52: ...zero If there is no Light for the specified ligt returns null The parameter h is a handler of the traffic light TrafficLight 3 17 2 Methods IsValid C bool IsValid C Does not exist Returns true if the...

Page 53: ...dler of incidences record HistoricIncidences Returns a handler of the incidence Incidence In C when the object is no more needed the function VL_Incidence_Release must be called see Release method fro...

Page 54: ...rty the information of the record s last incidence that complies with the applied filter see the method SetFilter from HistoricIncidences class In C the parameter h is a handler of incidences record H...

Page 55: ...ore needed the function VL_Summary_Release must be called see Release method from Summary class In C if there is no available summary returns null 3 19 2 Methods MoveFirst C void MoveFirst C void VL_H...

Page 56: ...summary record HistoricSummaries SetFilter C void SetFilter VLDetectorType detectorType int detectorId C void VL_HistoricSummaries_SetFilter int h int detectorType int detectorId Sets a summary record...

Page 57: ...the parameter h is a handler of real time information RealTimeInformation Timestamp C Timestamp get_Timestamp C Does Not exist In C returns the timestamp when unit generated the real time info In C t...

Page 58: ...t get_Length C int VL_RealTimeInformation_get_Length int h Returns the length of the detected vehicle in millimetres If length calculation was not possible the value will be 1 In C the parameter h is...

Page 59: ...ter would always be valid AddRef C Does not exist C void VL_RealTimeInformation_AddRef int h Ver 2 2 1 Memory management Release C Does not exist C void VL_RealTimeInformation_Release int h Ver 2 2 1...

Page 60: ...valid one see IsValid from Region class 3 22 Region Class Define the coordinates of each vertex of a rectangle 3 22 1 Properties X1 C int get_X1 C int VL_Region_get_X1 int h Returns the X value horizo...

Page 61: ...nt get_Y3 C int VL_Region_get_Y3 int h Returns the Y value vertical axis of vertex 3 In C the parameter h is a handler of the region Region X4 C int get_X4 C int VL_Region_get_X4 int h Returns the X v...

Page 62: ...Light Number of lights in the traffic light Item C Light Item int item C Does not exist check VL_TrafficLight_get_Lights_Item int h int item of TrafficLight Returns the light in the indicated position...

Page 63: ..._Radius int h Returns the radius of the traffic light s light in the image in pixels In C the parameter h is a handler of the light Light 3 24 2 Methods IsValid C bool IsValid C does not exist Returns...

Page 64: ...pe C int VL_Incidence_get_DetectorType int h Returns the type of detector that generated the incidence In C the parameter h is a handler of the incidence Incidence Id C int get_Id C int Incidence_get_...

Page 65: ...ence Incidence AmberLightTime Returns the elapsed time with the amber light on before turning into red C int get_AmbertLightTime C int VL_Incidence_get_AmbertLightTime int h Devuelve el tiempo transcu...

Page 66: ...he collection of incidence images starting from zero If there is no imaage at the specified position returns null In C if the object is no more needed the function VL_Image_Release must be called see...

Page 67: ...s not exist C void VL_Incidence_Release int h See 2 2 1 Memory management 3 26 Images Class Collection of images of an incidence 3 26 1 Properties Count C int Count C Does not exist check VL_Incidence...

Page 68: ...will not be filled up and will return 1 In C the parameter h is a handler of the image Image Timestamp C Timestamp get_Timestamp C Does not exist In C returns the time stamp when the unit captured th...

Page 69: ...Video Class Logical representation of an incidence video recording 3 28 1 Properties Location C int Location char pBuffer int bufferLen C int VL_Video_get_Location int h char pBuffer int maxSize prov...

Page 70: ...capture In C there is no representation of TimeStamp class but methods to directly access to its properties int VL_Video_get_EndTimestamp_Seconds int h date and time when the video recording stopped s...

Page 71: ...he parameter h is a handler of video Video 3 28 2 Methods IsValid C bool IsValid C Does not exist Returns true if the object contains valid information about a video and false if invalid Some methods...

Page 72: ...the summary In C the parameter h is a handler of summary Summary DetectorType C VLDetectorType get_DetectorType C int VL_Summary_get_DetectorType int h Returns the detector type that generated the su...

Page 73: ...of vehicles in the summary in km h If speed calculation was not possible returns 1 In C the parameter h is a handler of summary Summary AvgLength C int get_AvgLength C int VL_Summary_get_AvgLength int...

Page 74: ...s not exist In C returns the collection of values making up distribution of lengths in the summary In C there is no representation of LengthsDistribution collection but methods to directly access to c...

Page 75: ..._get_SpeedsUpperLimit_Count int h number of values making up the ranges of distribution of speeds in the summary int VL_Summary_get_SpeedsUpperLimit_Item int h int item returns the value in the indica...

Page 76: ...pancies in the summary int VL_Summary_get_OccupationsUpperLimit_Item int h int item returns the value in the indicated position inside the collection of values making up the ranges of distribution of...

Page 77: ...nt item from Summary Returns the percentage in the indicated position within the collection of percentages of vehicles that have circulated through a detector for a given speed range The location of e...

Page 78: ...of ranges in the collection LengthsUpperLimit of the detector The parameter item must specify the position starting from zero If there is no LengthsDistribution at the specified position it returns an...

Page 79: ...of values making up the speed ranges of a detector For deeper information about speed distribution see SmartLoop user manual 3 33 1 Properties Count C int Count C Does not exist check VL_Summary_get_...

Page 80: ...on of values making up the length ranges of a detector The values are sorted from lowest to highest placing the smallest value at the first position in the collection The parameter item must specify t...

Page 81: ...invalid one see IsValid from OccupationsUpperLimit class 3 36 Timestamp Class Definition of timestamp 3 36 1 Properties Seconds C int get_Seconds C Does not exist check class_get_Timestamp_Seconds int...

Page 82: ...3 38 Configuration Class Class that gives access to unit s configuration system 3 38 1 Methods IsValid C bool IsValid C Does not exist Returns true if the object contains valid information about the c...

Page 83: ...Changes the password of the unit The change will be effective when changes are applied newPassword must be a text string ending with 0 Returns true for a successful operation otherwise returns false...

Page 84: ...rmware Returns true for a successful operation otherwise returns false In C the parameter h is a handler of Configuration ExportLog C bool ExportLog VLLogSystem logType const char fileName C int VL_Co...

Page 85: ...the nth variable of unit s configuration system In C if the SettingsEntry indicated does not exist returns an invalid one in C returns null In C when the object is needed no more the function VL_Setti...

Page 86: ...alse In C the parameter h is a handler of Configuration ApplyChanges C bool ApplyChanges C int VL_Configuration_ApplyChanges int h Applies changes made in unit s configuration system and reboots the u...

Page 87: ...resenceDetector C int VL_Configuration_New_PresenceDetector int h Creates a new presence detector default values To add a new presence detector to the unit this function must be used to later on modif...

Page 88: ...n ApplyDetector of Configuration class In C the parameter h is a handler of Configuration NewStoppedCarDetector C ConfigurationStoppedCarDetector NewStoppedCarDetector C int VL_Configuration_New_Stopp...

Page 89: ...e unit s detector list which is specified by one of the following two parameters Index position of the detector in the list of detectors of the unit Id detector s identifier Only one of them can be us...

Page 90: ...the number of configured traffic lights In C the parameter h is a handler of Configuration GetTrafficLight C ConfigurationTrafficLight GetTrafficLight int index int id C int VL_Configuration_Get_Traff...

Page 91: ...ew traffic light into the unit s traffic light list or modifies an existing one The action done will depend on the parameter action see 3 61 VLConfigurationActionType Type type If an existing traffic...

Page 92: ...o ConfigurationOutputActuator with the specified index position returns an invalid one in C returns null In C when the object is needed no more the function VL_ConfigurationOutputActuator_Release must...

Page 93: ...Actuator a handler of ConfigurationOutputActuator SetLanguage C bool SetLanguage const char languageId C int Configuration_SetLanguage int h const char languageId Sets the language of the configuratio...

Page 94: ...ameter h is a handler of ConfigurationDetector C void put_Id int id C void VL_ConfigurationDetector_put_Id int h int id Modifies the identifier The new value is set by parameter id In C the parameter...

Page 95: ...bled int h Returns the status of summaries generation In C the parameter h is a handler of ConfigurationDetector C void put_AreSummariesEnabled bool value C void VL_ConfigurationDetector_put_AreSummar...

Page 96: ...VL_ConfigurationDetector_put_SendIncidences int h int n True to enable sending generated incidences in the detector false otherwise In C the parameter h is a handler of ConfigurationDetector SendSumm...

Page 97: ...nfigurationDetector Coordinates Detector coordinates C Region get_Coordinates C int VL_ConfigurationDetector_get_Coordinates int h Returns the detector coordinates In C the parameter h is a handler of...

Page 98: ...urationDetector Class 3 41 ConfigurationQueueDetector class Represents a queue detector of the configuration system This class derives from ConfigurationDetector see 3 39 ConfigurationDetector Class 3...

Page 99: ...ctor_get_Distance int h Returns the distance from the unit to the detector In C the parameter h is a handler of ConfigurationDetector C void put_Distance bool value C void VL_ConfigurationSpeedDetecto...

Page 100: ...tus of speed and length calculation In C the parameter h is a handler of ConfigurationDetector C void put_CalculateMetrics bool value C void VL_ConfigurationRedLightDetector_put_CalculateMetrics int h...

Page 101: ...rameter h is a handler of ConfigurationDetector DelayTime Daly time for the detector in miliseconds C int get_DelayTime C int VL_ConfigurationRedLightDetector_get_DelayTime int h Returns the delay tim...

Page 102: ...l If a configured traffic litght is used the value will be 1 C int get_RedInput C int VL_ConfigurationRedLightDetector_get_RedInput int h Returns the digital input identifier In C the parameter h is a...

Page 103: ...eoEnabled C int VL_ConfigurationRedLightDetector_get_IsVideoEnabled int h Returns the status of video generation In C the parameter h is a handler of ConfigurationDetector C void put_IsVideoEnabled bo...

Page 104: ...oid put_PostVideoTimeMs int value C void VL_ConfigurationRedLightDetector_put_PostVideoTimeMs int h int n Modifies the delay time In C the parameter h is a handler of ConfigurationDetector LastPicture...

Page 105: ...is a handler of ConfigurationDetector C void put_MaxStopTime int value C void VL_ConfigurationStoppedCarDetector_put_MaxStopTime int h int n Modifies the minimum stop time at the detector in order to...

Page 106: ...t_RedInput int h int n Modifies the digital input identifier In C the parameter h is a handler of ConfigurationDetector IsVideoEnabled Shows if video generation at the units is enabled If disabled the...

Page 107: ...handler of ConfigurationDetector PostVideoTimeMs Time that the stop of the video recording will be delayed in miliseconds C int get_PostVideoTimeMs C int VL_ConfigurationStoppedCarDetector_get_PostVid...

Page 108: ...itionOperatorType Type C VLConditionOperatorType get_Operator C int VL_ConfigurationOutputActuator_get_Operator int h Returns the operator In C the parameter h is a handler of ConfigurationOutputActua...

Page 109: ...onfigurationOutputActuator_get_Time int h Returns the time duration of digital output activation In C the parameter h is a handler of ConfigurationDetector C void put_Time int value C void VL_Configur...

Page 110: ...tem int item C Does not exist check VL_ConfigurationOutputActuator_get_Conditions_Item from ConfigurationOutputActuator Returns the condition in the specified position inside the conditions collection...

Page 111: ...n class Represents a condition of an output actuator in a configuration system 3 47 1 Properties DetectorId Identifier of the detector associated to the condition C int get_DetectorId C int VL_Configu...

Page 112: ...type C VLOperatorType get_Operator C int VL_ConfigurationOutputActuatorCondition_get_Operator int h Returns the conditions s operator In C the parameter h is a handler of ConfigurationOutputActuatorCo...

Page 113: ...e configuration system For historical reasons all the coordinates described in a detector will be defined in a 5 megapixel image from 0 to 2559 and from 0 to 1919 3 48 1 Properties Id Identifier of th...

Page 114: ...em int h int item returns the light located at the specified position inside the lights collection of the traffic light starting from zero If there is no ConfigurationLight por the specified position...

Page 115: ...nTrafficLight_get_Lights_Count of ConfigurationTrafficLight Number of configured lights Item C ConfigurationLight Item int item C Does not exist check VL_ConfigurationTrafficLight_get_Lights_Item of C...

Page 116: ...affic light that has the position index Returns true if deletion was successful false otherwise 3 50 ConfigurationLight class Represents a light that belongs to a traffic light of the configuration sy...

Page 117: ...is a handler of ConfigurationDetector Y Position Y vertical axis of the center of the light C int get_Y C int VL_ConfigurationLight_get_Y int h Returns the position Y vertical axis of the light In C t...

Page 118: ...t_Name char buf int bufLen C void VL_SystemInformation_get_Name int h char buf int bufLen Returns the product name The parameter buff is a pointer to a buffer where the name will be written and the bu...

Page 119: ...l be written and the buffLen parameter must specifiy the maximum buffer size in bytes In C the parameter h is a handler of Configuration BootTime C long get_BootTime C long VL_SystemInformation_get_Bo...

Page 120: ...bufLen Returns the name of the variable The parameter buff is a pointer to a buffer where the name will be written and the buffLen parameter must specifiy the maximum buffer size in bytes In C the pa...

Page 121: ...ingsEntry 3 52 2 Methods IsValid C bool IsValid C Does not exist Returns true if the object contains valid information false otherwise AddRef C Does not exist C void VL_SettingEntry_AddRef int h See 2...

Page 122: ...the type of incidence IT_RED_LIGHT_VIOLATION 1 vehicle violating the red light sign IT_STOPPED_CAR_VIOLATION 2 vehicle stopped in a forbidden zone 3 56 VLLightType Type Specifies the colour of a light...

Page 123: ...E_END 3 End of a video 3 60 VLLogSystem Type Specifies the log file type VL_LOG_UNIT 0 Log file of the system VL_LOG_COMBRIDGE 1 Obsolete VL_LOG_CONFIG 2 Log file of the configuration system VL_LOG_FI...

Page 124: ...62 VLConditionOperatorType Type Specifies the operator that will define the behaviour of an output actuator COT_ALL 0 All conditions have to be true to activate the digital output COT_ANY 1 One or mo...

Page 125: ...otify the central system of a happening arrival of an incidence activation of a digital output etc An event must be responded to by the central system within a limited period of time can be modified i...

Page 126: ...est has been made might not be the response to the request Example of requests and their responses 4 1 Message format Messages will always have the same format Bytes are ordered in all fields with the...

Page 127: ...tx to the last byte in the Message data Etx 1 byte signals the end of the message ASCII character 3 4 2 Message version Messages contain a field version which notes the version of the message used thu...

Page 128: ...t will contain the message version already set This process will be repeated at every unit start up Example On the other hand when the unit receives a request message from the central system always tr...

Page 129: ...ery product This table describes the useful messages and structures for each unit type SmartLoop TS SmartLoop TS Plus BiardWatch RL BiardWatch RL Plus Common structures Region DetectorHeader SpeedDete...

Page 130: ...tectorInformationQuery TrafficLightsCountQuery TrafficLightInformationQuery SetUnitTasksQuery SetDetectorTasksQuery OutputQuery RebootQuery VideoQuery PingQuery LoginQuery PasswordQuery SyncTimeQuery...

Page 131: ...GetTrafficLightsCountQuery RemoveTrafficLightQuery GetTrafficLightQuery SetTrafficLightQuery GetOutputActuatorsCountQuery RemoveOutputActuatorQuery GetOutputActuatorQuery SetOutputActuatorQuery Ackno...

Page 132: ...s returned at the call to function time_t time time_t timer from ANSI C standard Useconds microseconds of the timestamp 4 5 2 Region Informs about the location of the four vertex that make up a detect...

Page 133: ...ncidences SIn true if sending the incidences generated at the detector to the central system is enabled false if disabled SendRealTimeInformation SRT true if sending the real time events generated at...

Page 134: ...l image of the detector s second loop using a Region structure 4 5 5 QueueDetector Describes a queue detector The structure corresponds to the version 3 Check 5 Communications protocol old versions to...

Page 135: ...t X X position horizontal axe of light s centre in the 5 megapixel image Y Y position vertical axe of light s centre in the 5 megapixel image Radius radius of the light in the 5 megapixel image in pix...

Page 136: ...o red until the infringement is made to generate a valid incidence in milliseconds FirstLoop Loop1 coordinates in the 5 megapixel image of the detector s first loop using a Region structure SecondLoop...

Page 137: ...f the detectors using a DetectorHeader MaxStopTime minimum stop time with the traffic light on red in order to generate an incidence in miliseconds Loop description of the coordinates in the 5 megapix...

Page 138: ...s used Duration duration of the video file in miliseconds Framerate FR frames per second of the video file 4 5 12 OutputActuatorCondition Describes a conditions of an output actuator DetectorId id of...

Page 139: ...l output OutputId OId digital output identifier that corresponds to the actuator Time time that the actuator keeps the digital output active in milliseconds NumConditions NCo number of conditions that...

Page 140: ...summary data collection started in seconds elapsed since 00 00 hours on the first of January of 1970 End timestamp when summary data collection finished in seconds elapsed since 00 00 hours on the fi...

Page 141: ...ion of lengths in the summary They are provided using 7 consecutive integers where the ones that are not used show a 1 LengthsUpperLimit LenUL collection of values making up the ranges of distribution...

Page 142: ...DetectorType DTy type of detector that generated the real time event 1 speed detector 2 queue detector 3 presence detector 4 red light detector 5 stopped car detector Speed approximated speed of the d...

Page 143: ...light detector 5 stoppped car detector Timestamp timestamp when the real time event was generated using a QuercusTimestamp structure Speed approximated speed of the detected vehicle in km h If speed...

Page 144: ...Characters not being used will be zero Major Maj major number of the version Minor Min minor number of the version Revision Rev revision number of the version 4 7 2 RealTimeQuery Query to receive the...

Page 145: ...cle in km h Length approximated length of the detected vehicle in millimetres WrongWay WW true if the direction of the detected vehicle is incorrect and false if the direction is correct Occupation oc...

Page 146: ...utCh status of the 2 digital inputs of the unit Each one of the first 2 bits corresponds to the status of one input being the least significant bit for input 0 Possible values 1 enabled 0 disabled The...

Page 147: ...480 high and a complete status of detectors traffic lights and digital inputs and outputs The image content and the focus value current digital focus coefficient will vary depending on the value of t...

Page 148: ...ttom RoidBttm Y value vertical axis from bottom side of the rectangle to not define it specify 1 RoiRight X value horizontal axis from right side of the rectangle to not define it specify 1 ExposureTi...

Page 149: ...er Possible values 0 red state other value any other state Inputs status of the 2 digital inputs Each one of the first 2 bits corresponds to the status of an input being the least significant bit for...

Page 150: ...ration of incidences at the unit is enabled false disabled SendSummaries SSm if true sending the summaries generated at the unit to the central system is enabled false disabled SendIncidences SIn if t...

Page 151: ...specific detector in the unit The format of the answer will vary depending on the type of detector that is described The structures correspond to the version 3 Check 5 Communications protocol old ver...

Page 152: ...tector using a SpeedDetector structure Answer presence detector Type 75 Message Data PresenceDetector PresDetect description of the detector using a PresenceDetector structure Answer queue detector Ty...

Page 153: ...Message Data no message data Answer Type 77 Message Data Count number of configured traffic lights in the unit 4 7 12 TrafficLightInformationQuery Request of information about a configured traffic lig...

Page 154: ...TrafficLight structure 4 7 13 SetUnitTasksQuery Query to configure the tasks a unit must perform Currently only one task is possible to configure inform about the changes at digital inputs Query Type...

Page 155: ...tral system the summaries generated at the unit is enabled false disabled SendIncidences SIn if true sending to the central system the incidences generated at the unit is enabled false disabled SendRe...

Page 156: ...n to perform 0 reboot Currently only the reboot operation is possible and the code is required so the protocol is open to future extensions Answer ACK NAK 4 7 17 VideoQuery Query to transfer a video f...

Page 157: ...y valid the first Length bytes 4 8 Confirmation messages 4 8 1 ACK Confirmation that the message has been received and interpreted correctly Type 192 Message Data no message data 4 8 2 NAK Informs tha...

Page 158: ...d feature action not supported for example if you want to enable the generation of incidences at a queue detector 8 Bad authorization does not exist the authorization to process such request The libra...

Page 159: ...f the conditions of an output actuator is wrong 32 operator variable of one of the conditions of an output actuator is wrong 33 value variable of one of the conditions of an output actuator is wrong 3...

Page 160: ...to check that at the IP and port where the message is sent there is a configuration system running It is not needed to complete a successful Login message to get answer to this message Query Type 51 M...

Page 161: ...s access to configuration system and sets current SessionId to invalid Query Type 129 Message Data SessionId session identifier obtained at the last valid Login Answer ACK NAK 4 9 4 PasswordChange Cha...

Page 162: ...time against the configured time server Query Type 131 Message Data SessionId session identifier obtained at the last valid Login Answer ACK NAK 4 9 6 SetTime Sets indicated date and time Query Type...

Page 163: ...Type 133 Message Data SessionId session identifier obtained at the last valid Login FileName name of the update file Answer ACK NAK 4 9 8 RestoreFirmware Restores the factory original firmware and re...

Page 164: ...ning during the process Moreover formatting can take some minutes while the configuration system will not answer to any message Once the format process is done the unit must be rebooted in order to ge...

Page 165: ...that has to be given to file stored in FTP root Answer ACK NAK 4 9 11 SystemInfo Information about the unit The structures correspond to the version 1 Check 5 Communications protocol old versions to...

Page 166: ...onds from 01 01 1970 00 00 00h FirmwareMajor Maf first figure in the firmware version E g 1 2 3 FirmwareMinor Mif second figure in the firmware version E g 1 2 3 FirmwareRevision Rf third figure in th...

Page 167: ...guration to a file in the unit s ftp server root Query Type 140 Message Data SessionId session identifier obtained at the last valid Login FileName filename in the unit s ftp server root where the con...

Page 168: ...dChanges Discards changes made to the system variables Query Type 142 Message Data SessionId session identifier obtained at the last valid Login Answer ACK NAK 4 9 17 Restart This query has been desig...

Page 169: ...number variables of the configuration system Query Type 150 Message Data SessionId session identifier obtained at the last valid Login Answer Type 182 Message Data EntriesCount number of variables 4...

Page 170: ...e that its information is required Only used if field Name is empty Answer Type 183 Message Data Name name of the variable Value current value of the varible Description1 description of the variable i...

Page 171: ...lt value of the variable specified by its name Query Type 153 Message Data SessionId session identifier obtained at the last valid Login Name name of the variable to restore Answer ACK NAK 4 9 22 GetD...

Page 172: ...f the detector in the detector s collection of the configuration system starting from zero DetectorId identifier of the detector Only one of the two parameters can be used to specify a detector Index...

Page 173: ...ector Only one of the two parameters can be used to specify a detector Index or DetectorId the parameter not used must be set to 1 Answer presence detector Type 185 Message Data Detector detector desc...

Page 174: ...ctor Answer stopped car detector Type 191 Message Data Detector detector description using a structure StoppedCarDetector 4 9 25 SetPresenceDetector Add or modify a presence detector in the configurat...

Page 175: ...n answer its subcode field will give more detailed information about why the query has failed See 4 8 2 NAK 4 9 26 SetQueueDetector Add or modify a queue detector in the configuration system Query The...

Page 176: ...k 5 Communications protocol old versions to see the older versions Type 165 Message Data SessionId session identifier obtained at the last valid Login Action Act action 0 modify the existing detector...

Page 177: ...r must indicate the old identifier can have been modified On the other hand if a new detector is added it must be set to 1 Detector detector description using a structure SpeedDetector Answer ACK NAK...

Page 178: ...be set to 1 Detector detector description using a structure StoppedCarDetector Answer ACK NAK If a NAK message is received as an answer its subcode field will give more detailed information about why...

Page 179: ...the configuration system starting from zero TrafficLightId traffic light identifier Only one of the two parameters can be used to specify the traffic light Index or TrafficLightId the parameter not u...

Page 180: ...e parameter not used must be set to 1 Answer Type 190 Message Data TrafficLight TL description of the traffic light using a structure TrafficLight 4 9 33 SetTrafficLight Add or modify a traffic light...

Page 181: ...er ACK NAK If a NAK message is received as an answer its subcode field will give more detailed information about why the query has failed See 4 8 2 NAK 4 9 34 GetLanguage Obtains the language currentl...

Page 182: ...he character 0 Response ACK NAK 4 9 36 GetOutputActuatorsCount Obtains the number of output actuators in the configuration system Query Type 167 Message Data SessionId session identifier obtained at t...

Page 183: ...rameters can be used to specify the output actuator Index or OutputActuatorId the parameter not used must be set to 1 Answer ACK NAK 4 9 38 GetOutputActuator Obtains information about an output actuat...

Page 184: ...figuration system Query Type 170 Message Data SessionId session identifier obtained at the last valid Login Action Act action 0 modify the existing output actuator 1 add a new output actuator OutputAc...

Page 185: ...QuercusVL Programming Manual If a NAK message is revived as an answer its subcode field will give more detailed information about why the query has failed See 4 8 2 NAK Quercus Technologies 185...

Page 186: ...0 vehicle driving speed detected 1 vehicle length detected 2 driving direction detected 3 detector s occupancy percentage 4 vehicle presence Operator Op operator used by the actuator 0 equal to 1 dif...

Page 187: ...ng the real time events generated at the detector to the central system is enabled false if disabled SummariesPeriod SumPeriod configured summaries period in minutes NumOutputActuators NOut number of...

Page 188: ...ondLoop are defined in the 0 3 megapixel image The rest of the fields have the same meaning of version 1 5 1 4 QueueDetector Version 1 and 2 are the same Header Head description of detector s common f...

Page 189: ...mber of lights in the traffic light Lights description of each one of the configured lights using 5 consecutive Light structures maximum number of configurable lights Only the first NumLights are used...

Page 190: ...has been configured but a traffic light its value will be 1 AmberInput the identifier of the digital input used for the amber sign If no digital input has been configured because a traffic light will...

Page 191: ...Loop description of the coordinates in the 5 megapixel image of the only loop of the detector using a Region structure TrafficLightId identifier of the traffic light used as a stop signal If no traff...

Page 192: ...ation Version 1 The fields MaxStopTime and TotalStoppedTime don t exist The rest of fields have the same meaning of the version 2 Version 0 The fields MaxStopTime TotalStoppedTime VideoInformation and...

Page 193: ...end on the version of this query Answer The structure related to the detector description has changed the version of this message defines the version of the detector structure See the obsolete version...

Page 194: ...HardwareMinor and HardwareRevision don t indicate the hardware version but the firmware version 5 4 2 GetDetector Versions 0 1 and 2 Query The fields of the structure have the same meaning but the ver...

Page 195: ...ed the version of this message defines the version of the detector structure See the obsolete versions of RedLightDetector 5 4 6 SetSpeedDetector Versions 0 1 and 2 Query The structure related to the...

Page 196: ...rafficlight description has changed the version of this message defines the version of the trafficlight structure See the obsolete versions of TrafficLight 5 4 9 SetTrafficLight Version 0 Query The st...

Page 197: ...stem 6 1 Configuration A couple of configuration files must be created General configuration file Detectors configuration file 6 1 1 General configuration file Contains the unit configuration This fil...

Page 198: ...he file is divided into sections defined between brackets with their parameters described below one per line Global NumDetectors Detector1 parameter1 value1 The first section Globals indicates the num...

Page 199: ...parameters for speed detectors CalculateMetrics enables the calculation of speed and length 0 disabled 1 enabled CameraDistance horizontal distance between the unit and the detector in millimetres Le...

Page 200: ...comments and ignored by the simulator Unit events all lines will represent vehicle movements Several vehicles can be simulated These are managed by a single identifier integer value There are three t...

Page 201: ...wo vehicles movement The first vehicle drives from the bottom to the top of the image When bypassing the half it increases its speed Then the second car starts its movement from the top to the bottom...

Page 202: ...tLoopTS SmartLoopTSPlus FGlobals path absolute or relative to the unit configuration file FDetectors path absolute or relative to the detectors configuration file FLog path absolute or relative to the...

Page 203: ...ere the following fields can be seen Live Camera graphical representation of the virtual lane All movements taking place on that lane can be seen Detectors list of all detectors and their related task...

Page 204: ...stem 7 1 Configuration A couple of configuration files must be created General configuration file Detectors configuration file 7 1 1 General configuration file Contains the unit configuration This fil...

Page 205: ...ated detector The file is divided into sections defined between brackets with their parameters described below one per line Global NumDetectors NumTrafficLights Detector1 parameter1 value1 Trafficligh...

Page 206: ...n 1 signal through a digital input Extra parameters in a red light detector IsVideoEnabled enables disables the generation of a video to each incidence Possible values 1 enabled 0 disabled Only availa...

Page 207: ...ights number of lights 7 1 2 4 LightX_Y section Description of a light belonging to a defined traffic light X indicates the traffic light identifier and Y is the light identifier from 1 to the total a...

Page 208: ...light centre of the light x y 614 126 16 pixels radius The virtual lane parameters will be written in a configuration file There is an example available in the installation folder Simulation Simulatio...

Page 209: ...traffic light state Event parameters they will depend on the event type see below 7 2 1 Vehicle movement event Several vehicles can be simulated These are managed by a single identifier integer value...

Page 210: ...ter vehicle 2 type Van1 is created on position 35000 out of the image 0 Van1 2 35000 2000ms later vehicle 2 must be on position 10000 out of the image 2000 Van1 2 10000 7 2 2 Digital input event The s...

Page 211: ...on and no lights on 7 2 3 1 Instruction structure Milliseconds the simulator has to wait from the previous instruction until the execution of the next one Event type TrafficLight change of the traffi...

Page 212: ...the log file generated by RLSimu DPersistent folder where incidences will be stored simulates the Log folder of the unit FTP The simulator will create the sub folder Incidences if it don t exist FSim...

Page 213: ...unit Events list of the most recent events 7 4 Simulation example Example of a complete simulation Two vehicles are driving a truck and then a car while there occur changes in the I O card and also in...

Page 214: ...he image bottom 1000 Car1 2 10000 1000ms later end of movement of truck1 on the image top 1000 Truck1 1 45000 at the same time input 0 inactive 0 Input 0 0 at the same time traffic light changes to re...

Page 215: ...ed to detect any later manipulation Keep in mind that stored data make two records summaries and incidences of limited size so once the disk is full of data the oldest data will be deleted automatical...

Page 216: ...me number of detected vehicles AvgHeadway the average distance headway of vehicles in seconds Example of a XML file xml version 1 0 encoding UTF 8 Summary Unit 1 Unit Detector 1 Detector DetectorType...

Page 217: ...angeX range X where X is the range identifier starting from 1 InferiorLimit inferior limit of the range SuperiorLimit superior limit of the range not included If it s infinite its value will be 1 Perc...

Page 218: ...contains all data from the summary Unit unit identifier Detector detector identifier DetectorType type of detector SPEED for a speed detector Period period when data was collected From start of the p...

Page 219: ...limit of the range not included in millimetres SuperiorLimit superior limit of the range not included in millimetres If it s infinite its value will be 1 Percentage percentage associated to the range...

Page 220: ...ier left padded with zeros until reaching eight digits The contents of the file is the following Incidence contains all data from the incidence Id incidence identifier Type type of incidence RED_LIGHT...

Page 221: ...d year month day Time time formatted as hh mm ss us hours minutes seconds microseconds Duration video duration in miliseconds Width width of image in the video in pixels Incidence contains all data fr...

Page 222: ...Name 00000003 avi FileName IniTimeStamp Seconds 1276610126 Seconds USeconds 80133 USeconds Date 2010 06 15 Date Time 15 55 26 80133 Time IniTimeStamp EndTimeStamp Seconds 1276610127 Seconds USeconds 9...

Page 223: ...the video geneated if video generation is enabled Filename file name of the video recording InitTimestamp time stamp of the start of the video capturing Seconds showed in seconds since 00 00h of 01 0...

Page 224: ...ds 476000 USeconds Date 2012 06 26 Date Time 11 08 59 476000 Time TimeStamp Image1 Image2 FileName 00000002_2 jpg FileName TimeStamp Seconds 1340701741 Seconds USeconds 984000 USeconds Date 2012 06 26...

Page 225: ...rcc FMP4 Incidence data inserted into strings these strings are written at the start of AviChunk JUNK Digital sign of the whole video file This way joins incidence data video and time stamp together a...

Page 226: ...sage padding original message encrypted necessary bytes to make it multiple of 16 The type of AES codification will depend on the password length For passwords up to 16 characters AES 128 will be used...

Page 227: ...ications All provided programming examples that call the DLL functions can use the protocol encryption just setting Communications Password parameter on its configuration files 8 2 2 SFTP server When...

Page 228: ...itate to contact our technical support department USA 1 201 227 2020 Brazil and Latin America 55 11 2614 3006 Extension 21 EMEA Asia 34 977 300 377 Or by email at support quercus biz You can also cont...

Reviews: