quercus SmartLoop TS Programming Manual

quercus SmartLoop TS Programming Manual

Table of Contents

Advertisement

PROGRAMMING MANUAL
PROGRAMMING MANUAL
Software version 1.5.x
Firmware version 1.5.x
www.quercus.biz
www.quercus-technologies.com
www.quercus.com.br
Quercus Technologies

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SmartLoop TS and is the answer not in the manual?

Questions and answers

Summary of Contents for quercus SmartLoop TS

  • Page 1 PROGRAMMING MANUAL PROGRAMMING MANUAL Software version 1.5.x Firmware version 1.5.x www.quercus.biz www.quercus-technologies.com www.quercus.com.br Quercus Technologies...
  • Page 2 The contents of this manual are provided for information purposes only and can be modified with no prior warning. The manual can not be fully or partially reproduced, placed in a distribution system or released to third parties without the express permission of Quercus Technologies. Quercus Technologies...
  • Page 3: Table Of Contents

    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 Class................31 3.6.1. Properties.................31 3.6.2. Methods................34 3.7. UnitStatus Class..............38 3.7.1. Properties.................38 3.8. VersionInformation Class............39 3.8.1. Properties.................39 3.9. Detectors Class...............40 3.9.1. Properties.................40 3.10. Detector Class...............40 Quercus Technologies...
  • Page 4 3.18.1. Properties...............53 3.18.2. Methods................53 3.19. HistoricSummaries Class............55 3.19.1. Properties...............55 3.19.2. Methods................55 3.20. RealTimeInformation Class............57 3.20.1. Properties...............57 3.20.2. Methods................59 3.21. Regions Class................59 3.21.1. Properties...............60 3.22. Region Class................60 3.22.1. Properties...............60 3.22.2. Methods................62 3.23. Lights Class................62 3.23.1. Properties...............62 3.24. Light Class................63 Quercus Technologies...
  • Page 5 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. Properties...............79 3.33. SpeedsUpperLimit Class............79 3.33.1. Properties...............79 3.34. LengthsUpperLimit Class............80 3.34.1. Properties...............80 3.35. OccupationsUpperLimit Class...........81 3.35.1. Properties...............81 3.36. Timestamp Class..............81 3.36.1. Properties...............81 3.37. Notification Class..............82 3.37.1. Properties...............82 Quercus Technologies...
  • Page 6 3.46. ConfigurationOutputActuatorConditions class......110 3.46.1. Methods................110 3.47. ConfigurationOutputActuatorCondition class......112 3.47.1. Properties..............112 3.47.2. Methods ...............113 3.48. ConfigurationTrafficLight class..........114 3.48.1. Properties..............114 3.48.2. Methods................115 3.49. ConfigurationLights Class............116 3.49.1. Methods................116 3.50. ConfigurationLight class............117 3.50.1. Properties..............117 3.50.2. Methods...............119 3.51. SystemInformation class ............119 3.51.1. Properties..............119 3.51.2. Methods................120 Quercus Technologies...
  • Page 7 4.3. Compatibility between QuercusVL® products......130 4.4. Initial concepts ..............132 4.4.1. Units................132 4.4.2. Booleans.................132 4.4.3. Coordinates..............132 4.5. Common structures..............132 4.5.1. Timestamp..............132 4.5.2. Region................133 4.5.3. DetectorHeader...............133 4.5.4. SpeedDetector..............134 4.5.5. QueueDetector..............135 4.5.6. PresenceDetector.............135 4.5.7. Light................135 4.5.8. TrafficLight..............136 4.5.9. RedLightDetector.............136 4.5.10. StoppedCarDetector............138 Quercus Technologies...
  • Page 8 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.11. TrafficLightsCountQuery..........154 4.7.12. TrafficLightInformationQuery..........154 4.7.13. SetUnitTasksQuery............155 4.7.14. SetDetectorTasksQuery...........156 4.7.15. OutputQuery..............156 4.7.16. RebootQuery..............157 4.7.17. VideoQuery..............157 4.8. Confirmation messages............158 4.8.1. ACK................158 4.8.2. NAK................158 4.9. Configuration messages............160 4.9.1. Ping................161 Quercus Technologies...
  • Page 9 4.9.15. ApplyChanges..............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............173 4.9.24. GetDetector..............174 4.9.25. SetPresenceDetector............175 4.9.26. SetQueueDetector............176 4.9.27. SetRedLightDetector............177 4.9.28. SetSpeedDetector............178 4.9.29. SetStoppedCarDetector...........178 4.9.30. GetTrafficLightsCount............179 4.9.31. RemoveTrafficLight............180 4.9.32. GetTrafficLight...............180 4.9.33. SetTrafficLight...............181 Quercus Technologies...
  • Page 10 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. DetectorInformationQuery..........194 5.3.3. TrafficLightInformationQuery..........194 5.4. Configuration messages............195 5.4.1. SystemInfo..............195 5.4.2. GetDetector..............195 5.4.3. SetPresenceDetector............195 5.4.4. SetQueueDetector............196 5.4.5. SetRedLightDetector............196 5.4.6. SetSpeedDetector............196 5.4.7. SetStoppedCarDetector.............196 5.4.8. GetTrafficLight..............196 5.4.9. SetTrafficLight..............197 Quercus Technologies...
  • Page 11 7.2.1.1. Instruction structure...............210 7.2.1.2. Example..................211 7.2.2. Digital input event............211 7.2.2.1. Instruction structure...............211 7.2.2.2. Example..................212 7.2.3. Traffic light event.............212 7.2.3.1. Instruction structure...............212 7.2.3.2. Example..................212 7.3. Simulator................213 7.3.1. Graphical interface............213 7.4. Simulation example..............214 8. Additional functions..............216 8.1. Information at FTP..............216 Quercus Technologies...
  • Page 12 8.1.1. XML files.................216 8.1.1.1. Presence summary................216 8.1.1.2. Queue 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.2.2. SFTP server..............228 9. Annex F: Support.................229 Quercus Technologies...
  • Page 13 ® family products, which SmartLoop ® 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 communications, library and software tools. Quercus Technologies...
  • Page 14: Introduction

    ANSI C. In addition, the basic routines for UDP communications are also provided in files UDPTools.c and UDPTools.h. With the mentioned files, any client application that interacts with QuercusVL ® can be programmed from any device with network transmission capabilities. Quercus Technologies...
  • Page 15 We must take into account that even though there are different layers in the system, they do not add any noticeable overhead to the system's operation (even in machines with a low performance). So programming on top of the C or C++ libraries is equally efficient. Quercus Technologies...
  • Page 16: Basic Programming

    A short C++ program is shown next, which is capable of capturing events. It corresponds to the basic C++ sample located at Samples folder in the installation directory. /*------------------------------------------, | Copyright (C) 2011 Quercus Technologies | All rights reserved. `------------------------------------------*/ #include <stdio.h>...
  • Page 17 -1; if(!System::Initialize("Central.ini","Central.log",&EventHandler)) printf("Can't initialize system.\n"); return -1; printf("Press [RETURN] to exit\n"); getchar(); System::Terminate(); VLUnload(); return 0; Parts of the sample code: #include “VLWrapperCpp” The only header file required to interact with QuercusVL ® from C++. using namespace VL; Quercus Technologies...
  • Page 18: Memory Management

    All objects that make up the library can be created on the stack, passed as function parameters by value, returns, etc. without loosing memory or performance. For example the following construction is perfectly valid: Quercus Technologies...
  • Page 19: Build Of Executable

    2.1.2. Build of executable Visual Studio Open the workspace “Samples.dsw” located at folder “Samples”. ● Set the active project “CppApi_Basic”. ● “Build” the executable. ● Linux Open a console window. ● Go to folder Samples/CppApi_Basic. ● Type “make” command. ● Quercus Technologies...
  • Page 20 A short C program is shown next, which is capable of capturing events. It corresponds to the basic C sample located at Samples folder in the installation directory. /*------------------------------------------, | Copyright (C) 2011 Quercus Technologies | All rights reserved. `------------------------------------------*/ #include <stdio.h>...
  • Page 21 System_Initialize is in charge of system initialization, enabling events and setup networking with units configured at “Central.ini” file. “Central.log” file will store system logs. As can be seen, the previously defined functions are passed as parameters of this function, so that they can be called, when events are launched. Quercus Technologies...
  • Page 22: Memory Management

    The parameter “h” is a handler of the class. Example: detector = VL_Unit_get_Detectors_Item(unit, 0); // Getting the detector printf( …, VL_Detector_get_Id(detector)); // Working with the detector printf( …, VL_Detector_get_UnitId(detector)); // Working with the detector VL_Detector_Release(detector); // Releasing the detector Quercus Technologies...
  • Page 23: Build Of Executable

    Open a console. ● Go to folder Samples/CApi_Basic. ● Type “make” command. ● 2.3. Other examples At <Installation folder>/Samples you will find more VL sample code. The named folder also contains a “Readme.txt” file describing each sample code. Quercus Technologies...
  • Page 24: Reference Class

    3.1. Compatibility between QuercusVL products ® VL library is shared by various Quercus Technologies family products, 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:...
  • Page 25 ● ConfigurationOutputActuator ● ● ConfigurationOutputActuatorCondition ● ● ConfigurationOutputActuatorConditions ● ● SystemInformation ● ● ● ● SettingEntry ● ● ● ● Types VLDetectorType ● ● ● ● VLNotificationCode ● ● ● ● VLIncidenceType ● ● ● VLLightType ● ● Quercus Technologies...
  • Page 26: Hierarchy

    Example of incorrect code (in C++) printf( …, System::GetUnit(0).Detector(0).Id); // First use of the detector printf( …, System::GetUnit(0).Detector(0).Type); // Second use of the detector (it could have Quercus Technologies...
  • Page 27: Classes

    Status ● C++: static bool get_Status ( ) int VL_System_get_Status ( ) Returns system status. It will be true if all system components are working properly, or false if an error exists in one of them. Units ● Quercus Technologies...
  • Page 28: Methods

    The declaration of these functions is indicated in Events section of the class. If you don't need to capture any of these events, you can pass NULL instead of the pointer to callback function. Terminate ● C++: static void Terminate ( ) void VL_System_Terminate ( ) Quercus Technologies...
  • Page 29: Events

    (see method AddRef from Incidence class), and VL_Incidence_Release to remove the reference and free the allocated memory, when it is no longer needed (see Release method from Incidence class). OnSummary ● C++: void OnSummary(Summary summary) Quercus Technologies...
  • Page 30: Units Class

    “value” is the new value (true if active, false otherwise). 3.5. Units Class Collection of system units. 3.5.1. Properties Count ● C++: int Count ( ) Does not exist, check VL_System_get_Units_Count ( ) from System. Number of units in the system. Quercus Technologies...
  • Page 31: Unit Class

    ( char *buffer, int bufLen ) void VL_Unit_get_IpAddress ( int h, char *buffer, int bufLen ) Returns the Ip address of the unit. In C, the parameter “h” is a handler of the unit (Unit). Status ● Quercus Technologies...
  • Page 32 The parameter “h” is a handler of unit (Unit). If there is no detector for such identifier, returns null. When the detector is no longer needed, the function VL_Detector_Release must be called to free allocated memory (see Release method from Detector class). Quercus Technologies...
  • Page 33: Methods

    Returns the incidences record of the unit. In C, the parameter “h” is a handler of unit (Unit). HistoricSummaries ● C++: HistoricSummaries get_HistoricSummaries() int VL_Unit_get_HistoricSummaries(int h) Returns the summary record of the unit. In C, the parameter “h” is a handler of unit (Unit). Quercus Technologies...
  • Page 34: Methods

    The image content and the focus value (current digital focus coefficient) will vary depending on the value of the input parameters: Zoom to false, incorrect rectangle: the image obtained corresponds to the entire • image captured by the unit. The focus value will not be calculated (-1). Quercus Technologies...
  • Page 35 The least significant bit corresponds to the first loop. Possible values: 1 presence, 0 free. int *numRedLights: number of configured traffic lights. int *redLights: table with the status of each traffic light; although the size of it must be Quercus Technologies...
  • Page 36 Returns true if answered successfully, and false otherwise. In C, the parameter “h” is a handler of unit (Unit). GetVersion ● C++: VersionInformation GetVersion() int Unit_GetVersion(int h) Returns the firmware version of the unit. In C, the parameter “h” is a handler of unit (Unit). Quercus Technologies...
  • Page 37 Sets 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). GetUnitTasks ● C++: bool GetUnitTasks(bool *sendInputChanges) int VL_Unit_GetUnitTasks(int h, int *sendInputChanges) Quercus Technologies...
  • Page 38: Unitstatus Class

    In C, the parameter “h” is a handler of UnitStatus. Communication ● C++: bool get_Communication( ) int VL_UnitStatus_get_Communication(int h) Communication status of the unit. True if it is able to communicate, false otherwise. In C, the parameter “h” is a handler of UnitStatus. Quercus Technologies...
  • Page 39: Versioninformation Class

    In C, the parameter “h” is a handler of version (VersionInformation). Revision ● C++: int get_Revision() int VL_VersionInfo_get_Revision(int h) Informs about the Revision value of the version. In C, the parameter “h” is a handler of version (VersionInformation). 3.9. Detectors Class Collection of detectors inside a unit. Quercus Technologies...
  • Page 40: Properties

    Logic representation of a detector. 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.10.1. Properties Unit ● C++: int get_Unit() int Detector_get_UnitId(int h) Quercus Technologies...
  • Page 41 In C, the parameter “h” is a handler of detector (Detector). SendRealTimeInformation ● C++: bool get_SendRealTimeInformation() int VL_Detector_get_SendRealTimeInformation(int h) Returns true if sending real time info is enabled, false if disabled. In C, the parameter “h” is a handler of detector (Detector). Quercus Technologies...
  • Page 42: Methods

    In C++ returns the collection of coordinates of the loops that form the detector. In C does not exist a representation of the collection “Regions” but methods to directly access to collection properties: int VL_Detector_get_LoopsCoordinates_Count(int h): number of configured ● Quercus Technologies...
  • Page 43: Presencedetector Class

    Logic representation of a detector of Presence type. This class derives from Detector class, so all its methods and properties are inherited. It has implemented the assignment operator to use a generic detector as a presence detector. Example in C++ Quercus Technologies...
  • Page 44: Queuedetector Class

    Logic representation of a detector of speed type. This class derives from Detector class, so all its methods and properties are inherited. It has implemented the assignment operator to use a generic detector as a speed detector. Example in C++ if(detector.get_Type() == DT_SPEED) Quercus Technologies...
  • Page 45: Redlightdetector Class

    Logic representation of a detector of red light type. This class derives from Detector class, so all its methods and properties are inherited. It has implemented the assignment operator to use a generic detector as a red light detector. Quercus Technologies...
  • Page 46 In C, the parameter “h” is a handler of detector (RedLightDetector). Length ● C++: int get_Length() int VL_RedLightDetector_get_Length(int h) Returns the length of the detector; in millimetres. In C, the parameter “h” is a handler of detector (RedLightDetector). DelayTime ● C++: int get_DelayTime() int VL_RedLightDetector_get_DelayTime(int h) Quercus Technologies...
  • Page 47 In C, the parameter “h” is a handler of detector (RedLightDetector). IsVideoEnabled ● C++: bool get_IsVideoEnabled() int VL_RedLightDetector_get_IsVideoEnabled(int h) Returns true if the detector has the incidence video generation enabled, false otherwise. In C, the parameter “h” is a handler of detector (RedLightDetector). Quercus Technologies...
  • Page 48: Class Stoppedcardetector

    This class derives from Detector class, so all its methods and properties are inherited. It has implemented the assignment operator to use a generic detector as a stopped car detector. Example in C++ if(detector.get_Type() == DT_STOPPED_CAR) StoppedCarDetector myStpoppedCarDetector; myStpoppedCarDetector = detector; // assignment operator ProcessStoppedCarDetector (myStpoppedCarDetector); Quercus Technologies...
  • Page 49: Properties

    In C, the parameter “h” is a handler of detector (StoppedCarDetector). IsVideoEnabled ● C++: bool get_IsVideoEnabled() int VL_StoppedCarDetector_get_IsVideoEnabled(int h) Returns true if the detector has video generation at the incidences enabled, false otherwise. In C, the parameter “h” is a handler of detector (StoppedCarDetector). Quercus Technologies...
  • Page 50: Trafficlights Class

    They are located following the same configuration order. The parameter “item” must specify the position (starting from zero). If there is no traffic light for the indicated position, it will return an invalid one ( see IsValid from Quercus Technologies...
  • Page 51 In C, the parameter “h” is a handler of the traffic light (TrafficLight). NumLights ● C++: int get_NumLights() int VL_TrafficLight_get_NumLights(int h) Returns the number of configured lights at the traffic light. In C, the parameter “h” is a handler of the traffic light (TrafficLight). Quercus Technologies...
  • Page 52: Methods

    AddRef ● C++: Does not exist void VL_TrafficLight_AddRef ( int h ) See 2.2.1. Memory management. Release ● C++: Does not exist void VL_TrafficLight_Release ( int h ) See 2.2.1. Memory management. Quercus Technologies...
  • Page 53: Historicincidences Class

    (see the method SetFilter from HistoricIncidences class). In C the parameter “h” is a handler of incidences record (HistoricIncidences). MoveNext ● C++: bool MoveNext() int VL_HistoricIncidences_MoveNext(int h) Assigns to Current property, the information of the record's next incidence, that Quercus Technologies...
  • Page 54: Historicsummaries Class

    ● detectorId: identifier of detector. ● Use value -1 for the fields that should not be filtered. In C the parameter “h” is a handler of incidences record (HistoricIncidences). 3.19. HistoricSummaries Class Record of summaries of a unit. Quercus Technologies...
  • Page 55: Properties

    Assigns to Current property, the information of the record's next summary, that complies with the applied filter (see the method SetFilter from HistoricSummaries class). In C the parameter “h” is a handler of summary record (HistoricSummaries). MovePrevious ● Quercus Technologies...
  • Page 56: Realtimeinformation Class

    Information about a real time event generated by the unit. Depending of the type of the generated event some fields are used or not. The fields that don't provide information in an event will show value “-1”. 3.20.1. Properties Unit ● Quercus Technologies...
  • Page 57: Methods

    ( time_t *timer ) from ANSI C standard. VL_RealTimeInformation_get_Timestamp_USeconds(int microsecond ● when the real time info was generated. In C, the parameter “h” is a handler of real time information (RealTimeInformation). WrongWay ● Quercus Technologies...
  • Page 58 In C, the parameter “h” is a handler of real time information (RealTimeInformation). IsOccupied ● C++: bool get_IsOccupied() int VL_RealTimeInformation_get_IsOccupied(int h) Returns true if the detector reports vehicle presence, and false if free. In C, the parameter “h” is a handler of real time information (RealTimeInformation). Quercus Technologies...
  • Page 59: Regions Class

    3.21.1. Properties Count ● C++: int Count ( ) Does not exist, check VL_Detector_get_LoopsCoordinates_Count(int h) of Unit. Number of coordinates in the collection. Item ● C++: Region Item ( int item ) Does not exist, check VL_Detector_get_LoopsCoordinates_Item(int h, int Quercus Technologies...
  • Page 60 In C, the parameter “h” is a handler of the region (Region). ● C++: int get_X2() int VL_Region_get_X2(int h) Returns the X value (horizontal axis) of vertex 2. In C, the parameter “h” is a handler of the region (Region). ● C++: int get_Y2() Quercus Technologies...
  • Page 61: Methods

    ● C++: int get_Y4() int VL_Region_get_Y4(int h) Returns the Y value (vertical axis) of vertex 4. In C, the parameter “h” is a handler of the region (Region). 3.22.2. Methods IsValid ● C++: bool IsValid() Does not exist Quercus Technologies...
  • Page 62: Lights Class

    If there is no Light at the specified position, it returns an invalid one (see IsValid method from Light class). 3.24. Light Class Logic representation of a traffic light's light. 3.24.1. Properties Type ● C++: VLLightType get_Type() int VL_Light_get_Type(int h) Returns the light type (VLLightType). Quercus Technologies...
  • Page 63: Incidence Class

    “0”. In C++, however, this method is necessary because the object, as it is not a pointer, would always be valid. 3.25. Incidence Class Logic representation of an incidence. 3.25.1. Properties Unit ● Quercus Technologies...
  • Page 64 Returns the type of incidence. In C, the parameter “h” is a handler of the incidence (Incidence). Speed ● C++: int get_Speed() int VL_Incidence_get_Speed(int h) Returns the recorded speed, in km/h. If speed calculation was not possible returns -1. Quercus Technologies...
  • Page 65 Returns the minimum time a vehicle must be stopped, once the traffic light is on red, in order to generate a violation; in miliseconds. En C, the parameter “h” is a handler of incidence (Incidence). TotalStoppedTime ● C++: int get_TotalStoppedTime() int VL_Incidence_get_TotalStoppedTime(int h) Quercus Technologies...
  • Page 66: Methods

    In C, when the object is no more needed, the function VL_Video_Release must be called (see Release method from Video class). In C, the parameter “h” is a handler of the incidence (Incidence). 3.25.2. Methods IsValid ● C++: bool IsValid() Does not exist Quercus Technologies...
  • Page 67: Images Class

    Returns the image in the indicated position inside the incidence images collection. The parameter “item” must specify the position (starting from zero). If there is no image for the indicated position, it will return an invalid one (see IsValid Quercus Technologies...
  • Page 68: Methods

    January of 1970. It is the same format that is returned at the call to function time_t time ( time_t *timer ) from ANSI C standard. int VL_Incidence_get_Timestamp_USeconds(int h): microsecond when the ● picture was taken. 3.27.2. Methods IsValid ● C++: bool IsValid() Does not exist Quercus Technologies...
  • Page 69: Video Class

    IniTimestamp ● C++: Timestamp get_IniTimestamp() Does not exist. In C++, returns the time stamp where the unit started the video capture In C, there is no representation of “TimeStamp“ class, but methods to directly access to its properties: Quercus Technologies...
  • Page 70: Methods

    Duration ● C++: int get_Duration() int VL_Video_get_Duration ( int h ) Returns the video duration; in miliseconds. In C, the parameter “h” is a handler of video (Video). Framerate ● C++: int get_Framerate() int VL_Video_get_Framerate( int h ) Quercus Technologies...
  • Page 71 AddRef ● C++: Does not exist void VL_Video_AddRef ( int h ) See 2.2.1. Memory management. Release ● C++: Does not exist void VL_Video_Release ( int h ) See 2.2.1. Memory management. Quercus Technologies...
  • Page 72: Summary Class

    Returns the time stamp when summary data collection started; in seconds elapsed since 00:00 hours on the first of January of 1970. In C, the parameter “h” is a handler of summary (Summary). ● C++: int get_End() int VL_Summary_get_End(int h) Quercus Technologies...
  • Page 73 In C, the parameter “h” is a handler of summary (Summary). AvgHeadway ● C++: int get_AvgHeadway() int VL_Summary_get_AvgHeadway(int h) Returns the average distance headway of vehicles in the summary; in seconds. In C, the parameter “h” is a handler of summary (Summary). SpeedsDistribution ● C++: SpeedsDistribution get_SpeedsDistribution() Quercus Technologies...
  • Page 74 The parameter “h” is a handler of summary (Summary). OccupationsDistribution ● C++: OccupationsDistribution get_OccupationsDistribution() Does not exist In C++, it returns the collection of values making up distribution of occupancies in the summary. In C, there is no representation of “OccupationsDistribution” collection, but methods to Quercus Technologies...
  • Page 75 VL_Summary_get_LengthsUpperLimit_Count(int number values ● making up the ranges of distribution of lengths in the summary. int VL_Summary_get_LengthsUpperLimit_Item(int h, int item): returns the ● value in the indicated position, inside the collection of values making up the Quercus Technologies...
  • Page 76: Methods

    “0”. In C++, however, this method is necessary because the object, as it is not a pointer, would always be valid. AddRef ● C++: Does not exist void VL_Summary_AddRef ( int h ) See 2.2.1. Memory management. Release ● C++: Does not exist Quercus Technologies...
  • Page 77: Speedsdistribution Class

    3.31. LengthsDistribution Class Collection of percentages of vehicles that have circulated through a detector for a given length range. These ranges are defined in the collection LengthsUpperLimit. For deeper information about length distribution, see SmartLoop ® user manual. Quercus Technologies...
  • Page 78: Occupationsdistribution Class

    SmartLoop user manual. ® 3.32.1. Properties Count ● C++: int Count ( ) Does exist, check VL_Summary_get_OccupationsDistribution_Count(int h) from Summary Number of values in the collection. Item ● C++: int Item ( int item ) Quercus Technologies...
  • Page 79: Speedsupperlimit Class

    The parameter “item” must specify the position (starting from zero). If there is no SpeedsUpperLimit at the specified position, it returns an invalid one (see IsValid from SpeedsUpperLimit class). Quercus Technologies...
  • Page 80: Lengthsupperlimit Class

    Collection of values that make up the occupancy percentage ranges of a detector. For deeper information about occupation distribution, see SmartLoop user manual. ® 3.35.1. Properties Count ● C++: int Count ( ) Does exist, check VL_Summary_get_OccupationsUpperLimit_Count(int h) from Summary Number of values the collection. Quercus Technologies...
  • Page 81: Timestamp Class

    ( time_t *timer ) from ANSI C standard. USeconds ● C++: int get_USeconds() Does not exist, check VL_class_get_Timestamp_USeconds(int h), where class is the class referenced by Timestamp. Microsecond of the timestamp. 3.37. Notification Class Logical representation of a unit's notification. Quercus Technologies...
  • Page 82: Configuration Class

    VL_Configuration_Login ( int h, const char* password ) Provides access to unit's configuration system. The parameter “password” must indicate unit's password. Returns true for a successful operation, otherwise returns false. In C the parameter “h” is a handler of Configuration. Logout ● C++: bool Logout() Quercus Technologies...
  • Page 83 VL_Configuration_SetTime ( int h, long dateTime ) Sets date and time indicated in “dateTime”. This date and time must be specified as the number of seconds since January 1 of 1970 at 00:00 h. Returns true for a successful Quercus Technologies...
  • Page 84 In C the parameter “h” is a handler of Configuration. GetSystemInformation ● C++: SystemInformation GetSystemInformation() int VL_Configuration_GetSystemInformation (int h ) Returns a SystemInformation object containing information of the unit. In C the parameter “h” is a handler of Configuration. Returns a handler of SystemInformation. Quercus Technologies...
  • Page 85 In C, when the object is needed no more, the function VL_SettingsEntry_Release must be called (see Release method from SettingsEntry class) In C the parameter “h” is a handler of Configuration and returns a handler of Quercus Technologies...
  • Page 86 Discards changes made in unit's configuration system. Returns true for a successful operation, otherwise returns false. In C the parameter “h” is a handler of Configuration. ImportConfiguration ● C++: bool ImportConfiguration ( const char* fileName ) int VL_Configuration_ImportConfiguration ( int h, const char* fileName ) Quercus Technologies...
  • Page 87 To add a new queue detector to the unit, this function must be used, to later on modify the named detector and add it to the system with the function ApplyDetector of Configuration class. In C the parameter “h” is a handler of Configuration. NewSpeedDetector ● C++: ConfigurationSpeedDetector NewSpeedDetector() int VL_Configuration_New_SpeedDetector( int h ) Quercus Technologies...
  • Page 88 VL_Configuration_Get_DetectorCount ( int h ) Returns the number of configured detectors. In C the parameter “h” is a handler of Configuration. GetDetector ● C++: ConfigurationDetector GetDetector( int index, int id ) int VL_Configuration_Get_Detector( int h, int index, int id ) Quercus Technologies...
  • Page 89 If an existing detector is going to be modified, the old identifier must be specified (as it may have been modified) with the parameter “previousId”. If it is a new detector which is going to be joined, then use value -1. Quercus Technologies...
  • Page 90 In C++, if there is no ConfigurationTrafficLight with the specified index/position, returns an invalid one; in C returns null. when object needed more, function VL_ConfigurationTrafficLight_Release must be called (see Release method from ConfigurationTrafficLight class) In C the parameter “h” is a handler of Configuration. Quercus Technologies...
  • Page 91 To add a new output actuator to the unit, this function must be used, to later on modify the output actuator and add it to the system with the function ApplyOutputActuator of Configuration class. In C the parameter “h” is a handler of Configuration. Quercus Technologies...
  • Page 92 Id: output actuator's identifier. ○ Only one of them can be used; in the parameter not used, -1 must be indicated. Returns true if deletion was successful, false otherwise. In C the parameter “h” is a handler of Configuration. ApplyOutputActuator ● Quercus Technologies...
  • Page 93 The parameter “bufLen” must indicate the maximum size of this buffer in bytes. Returns true if it it has been possible to carry out the request and false if not. In C the parameter “h” is a Configuration handle. Quercus Technologies...
  • Page 94 In C, the parameter “h” is a handler of ConfigurationDetector. AreIncidencesEnabled ● Shows if the detector has the generation of incidences enabled. If disabled, no incidence will be generated in the detector. C++: bool get_AreIncidencesEnabled ( ) int VL_ConfigurationDetector_get_AreIncidencesEnabled( int h ) Quercus Technologies...
  • Page 95 C++: bool get_SendRealTimeInformation ( ) int VL_ConfigurationDetector_get_SendRealTimeInformation( int h ) Returns the status of real time information sending. In C, the parameter “h” is a handler of ConfigurationDetector. C++: void put_SendRealTimeInformation ( bool value ) Quercus Technologies...
  • Page 96 In C, the parameter “h” is a handler of ConfigurationDetector. C++: void put_SendSummaries ( bool value ) void VL_ConfigurationDetector_put_SendSummaries ( int h, int n ) True to enable sending generated summaries in the detector; false otherwise. In C, the parameter “h” is a handler of ConfigurationDetector. Quercus Technologies...
  • Page 97: Methods

    Modifies the detector coordinates. See the SmartLoop and BirdWatch user manuals to ® ® know how to define detector coordinates. In C, the parameter “h” is a handler of ConfigurationDetector. 3.39.2. Methods IsValid ● C++: bool IsValid() Does not exist. Quercus Technologies...
  • Page 98: Configurationpresencedetector Class

    3.42.1. Properties CalculateMetrics ● Shows if calculation of speed and length of vehicles is enabled. If disabled, the unit will not provide such values for the detector. C++: bool get_CalculateMetrics ( ) int VL_ConfigurationSpeedDetector_get_CalculateMetrics ( int h ) Quercus Technologies...
  • Page 99 VL_ConfigurationSpeedDetector_get_Length( int h ) Returns the detector's length. In C, the parameter “h” is a handler of ConfigurationDetector. C++: void put_Length ( bool value ) void VL_ConfigurationSpeedDetector_put_Length ( int h, int n ) Modifies the detector's length. Quercus Technologies...
  • Page 100: Configurationredlightdetector Class

    Returns the distance from the unit to the detector. In C, the parameter “h” is a handler of ConfigurationDetector. C++: void put_Distance ( int value ) void VL_ConfigurationRedLightDetector_put_Distance ( int h, int n ) Modifies the distance from the unit to the detector. Quercus Technologies...
  • Page 101 Modifies the delay time for the detector. In C, the parameter “h” is a handler of ConfigurationDetector. TrafficLightId ● Identifier of the traffic light associated with the detector. If digital inputs are used, the value will be -1. Quercus Technologies...
  • Page 102 ● Identifier of the digital input for the amber signal. If a configured traffic litght is used, or no amber signal is used, the value will be -1. C++: int get_AmberInput ( ) int VL_ConfigurationRedLightDetector_get_AmberInput( int h ) Quercus Technologies...
  • Page 103 Time that the start of the video capture in the incidences will be advanced; in miliseconds. C++: int get_PreVideoTimeMs ( ) int VL_ConfigurationRedLightDetector_get_PreVideoTimeMs( int h ) Returns the time to advance. In C, the parameter “h” is a handler of ConfigurationDetector. Quercus Technologies...
  • Page 104 Returns the delay time. In C, the parameter “h” is a handler of ConfigurationDetector. C++: void put_LastPictureDelayTimeMs ( int value ) void VL_ConfigurationRedLightDetector_put_LastPictureDelayTimeMs ( int h, int Modifies the delay time. In C, the parameter “h” is a handler of ConfigurationDetector. Quercus Technologies...
  • Page 105: Properties

    C++: int get_TrafficLightId ( ) int VL_ConfigurationStoppedCarDetector_get_TrafficLightId( int h ) Returns the traffic light identifier. In C the parameter “h” is a handler of ConfigurationDetector. C++: void put_TrafficLightId ( int value ) void VL_ConfigurationStoppedCarDetector_put_TrafficLightId ( int h, int n ) Quercus Technologies...
  • Page 106 In C the parameter “h” is a handler of ConfigurationDetector. C++: void put_IsVideoEnabled ( bool value ) void VL_ConfigurationStoppedCarDetector_put_IsVideoEnabled ( int h, int n ) Modifies the state of video generation. In C the parameter “h” is a handler of ConfigurationDetector. PreVideoTimeMs ● Quercus Technologies...
  • Page 107: Configurationoutputactuator Class

    VL_ConfigurationStoppedCarDetector_put_PostVideoTimeMs ( int h, int n ) Modifies the delay time. In C the parameter “h” is a handler of ConfigurationDetector. 3.45. ConfigurationOutputActuator class Represents an output actuator in a configuration system. 3.45.1. Properties ● Identifier of the output actuator. Quercus Technologies...
  • Page 108 In C, the parameter “h” is a handler of ConfigurationOutputActuator. OutputId ● Identifier of the digital output associated to the actuator. C++: int get_OutputId ( ) int VL_ConfigurationOutputActuator_get_OutputId ( int h ) Returns the identifier of the digital output associated to the actuator. Quercus Technologies...
  • Page 109: Methods

    In C, the parameter “h” is a handler of ConfigurationDetector. 3.45.2. Methods IsValid ● C++: bool IsValid() Does not exist. Returns true if the object contains valid information, false otherwise. AddRef ● C++: Does not exist void VL_ConfigurationOutputActuator_AddRef ( int h ) See 2.2.1. Memory management. Quercus Technologies...
  • Page 110: Configurationoutputactuatorconditions Class

    (see IsValid from ConfigurationOutputActuatorCondition class). The parameter “item” must specify the position (starting from zero). Create ● C++: bool Create ( int detectorId, VLFieldType field, VLOperatorType op, int value ) Does exist, check VL_ConfigurationOutputActuator_get_Condition_Create from ConfigurationOutputActuator. Quercus Technologies...
  • Page 111: Configurationoutputactuatorcondition Class

    C++: void put_DetectorId ( int value ) void VL_ConfigurationOutputActuatorCondition_put_DetectorId( detectorId ) Modifies the identifier of the detector associated to the actuator. In C, the parameter “h” is a handler of ConfigurationOutputActuatorCondition. Field ● Field where the actuator is applied; see 3.57. VLFieldType Type type. Quercus Technologies...
  • Page 112 In C, the parameter “h” is a handler of ConfigurationOutputActuatorCondition. Value ● Comparison value of the actuator. C++: int get_Value ( ) int VL_ConfigurationOutputActuatorCondition_get_Value ( int h ) Returns the comparison value of the condition. In C, the parameter “h” is a handler of ConfigurationOutputActuatorCondition. Quercus Technologies...
  • Page 113: Methods

    In C, the parameter “h” is a handler of ConfigurationDetector. C++: void put_Id ( int value ) void VL_ConfigurationTrafficLight_put_Id ( int h, int n ) Modifies the traffic light identifier. In C, the parameter “h” is a handler of ConfigurationDetector. Quercus Technologies...
  • Page 114: Methods

    “index”, inside the lights collection of the traffic lights (starting from zero). Returns true if deletion was successful, false otherwise. 3.48.2. Methods IsValid ● C++: bool IsValid() Does not exist. Returns true if the object contains valid information, false otherwise. Quercus Technologies...
  • Page 115: Configurationlights Class

    If there is no ConfigurationLight por the specified position returns an invalid one (see IsValid from ConfigurationLight class). The parameter “item” must specify the position (starting form zero). Create ● C++: bool Create ( int x, int y, int radius, VLLightType type) Quercus Technologies...
  • Page 116: Configurationlight Class

    In C the parameter “h” is a handler of ConfigurationDetector. C++: void put_Type ( VLLightType value ) void VL_ConfigurationLight_put_Type( int h, int n ) Modifies the type of light. In C the parameter “h” is a handler of ConfigurationDetector. ● Quercus Technologies...
  • Page 117 Modifies the position X (verticall axis) of the light. In C the parameter “h” is a handler of ConfigurationDetector. Radius ● Radius of the light; in pixels. C++: int get_Radius ( ) int VL_ConfigurationLight_get_Radius ( int h ) Returns tre radius of the light. Quercus Technologies...
  • Page 118: Methods

    Returns the production date of the unit, in number of seconds since 00:00 hours of 1 of January in 1970. In C the parameter “h” is a handler of Configuration. SerialNumber ● C++: void get_SerialNumber ( char *buf, int bufLen ) Quercus Technologies...
  • Page 119 VL_SystemInformation_get_HardwareVersion ( int h ) Returns an object with the information about the unit hardware version. In C the parameter “h” is a Configuration handle and returns a VersionInformation handle. FirmwareVersion ● C++: VersionInformation get_FirmwareVersion() int VL_SystemInformation_get_FirmwareVersion ( int h ) Quercus Technologies...
  • Page 120: Methods

    “buffLen” parameter must specifiy the maximum buffer size in bytes. In C the parameter “h” is a handler of SettingsEntry. Description ● C++: void get_Description ( int langId, char *buf, int bufLen ) void VL_SettingEntry_get_Description ( int h, int langId, char *buf, Quercus Technologies...
  • Page 121: Methods

    See 2.2.1. Memory management. 3.53. VLDetectorType Type Specifies the type of detector. DT_ALL=0 Any type detector. ● DT_SPEED=1 Speed detector. ● DT_QUEUE=2 Queue detector. ● DT_PRESENCE=3 Presence detector. ● DT_RED_LIGHT=4 Red light detector. ● DT_STOPPED_CAR=5 Stopped car detector; ● Quercus Technologies...
  • Page 122: Vlnotificationcode Type

    Specifies the type of field to be taken into account for the digital outputs actuator of the detectors. FT_SPEED=0 Driving speed detected. ● FT_LENGTH=1 Vehicle length detected. ● FT_WRONG_WAY=2 Invalid driving direction detected. ● FT_OCCUPATION=3 Occupancy value. ● FT_IS_OCCUPIED=4 Vehicle presence. ● Quercus Technologies...
  • Page 123: Vloperatortype Type

    Specifies the operation to perfom in the detectors or traffic lights of the configuration system. VL_AT_MODIFY_DETECTOR=0 Modifies an existing detector. ● VL_AT_ADD_DETECTOR=1 Adds a new detector. ● VL_AT_MODIFY_TRAFFIC_LIGHT=2 Modifies an existing traffic light. ● VL_AT_ADD_TRAFFIC_LIGHT=3 Adds a new traffic light. ● VL_AT_MODIFY_OUTPUT_ACTUATOR=4 Modifies an existing output ● actuator. Quercus Technologies...
  • Page 124: 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 more conditions have to be true to activate the digital ● output. Quercus Technologies...
  • Page 125: Communications Protocol

    (can also be modified in the setup). If an event is answered with a NAK, it will also be sent again until the maximum number of retries is exceeded. Example of Events: Unit Central system Timeout A message of Request type is a message sent by the client application to a unit to obtain Quercus Technologies...
  • Page 126: Message Format

    Stx (1 byte): byte that marks the start of a frame (ASCII character 2). ● Unit Id (4 bytes): identifier of the capture unit sending or receiving the message; a zero ● means that this field has to be ignored. Size (4 bytes): total size of the message in bytes. ● Quercus Technologies...
  • Page 127: Message Version

    When the unit sends an event message, at first sends the highest known version of this message. If the central system answers with a NAK type 6 (Incorrect version), in the next try the unit will send a lower version of the message. Quercus Technologies...
  • Page 128 On the other hand, when the unit receives a request message from the central system, always tries to answer with the same message version, or NAK type 6 (Incorrect version) if it is not able to understand the message version. Example: Quercus Technologies...
  • Page 129 4.3. Compatibility between QuercusVL ® products As the VL protocol is shared between various products of Quercus Technologies, there are common messages and structures which are not applicable to every product. This table describes the useful messages and structures for each unit type:...
  • Page 130 ● ● ● ExportLogQuery ● ● ● ● SystemInformationQuery ● ● ● ● ExportStatusQuery ● ● ● ● ImportConfigurationQuery ● ● ● ● ExportConfigurationQuery ● ● ● ● ApplyChangesQuery ● ● ● ● DiscardChangesQuery ● ● ● ● Quercus Technologies...
  • Page 131: Initial Concepts

    4.4. Initial concepts 4.4.1. Units The size shown for each one of the protocol message fields is expressed in bytes. 4.4.2. Booleans Tall boolean values documented in the following protocol are translated as: State Value True False zero Quercus Technologies...
  • Page 132: Coordinates

    X3: position of vertex 3 in the image (horizontal axe). ● Y3: position of vertex 3 in the image (vertical axe). ● X4: position of vertex 4 in the image (horizontal axe). ● Y4: position of vertex 4 in the image (vertical axe). ● Quercus Technologies...
  • Page 133: Detectorheader

    Region structure. For historical reasons, the coordinates will be defined in a 5 megapixel image (from 0 to 2559 and from 0 to 1919). 4.5.4. SpeedDetector Describes a speed detector. The structure corresponds to the version 3. Check 5. Communications protocol (old versions) to see the older versions. Quercus Technologies...
  • Page 134: Queuedetector

    Loops (Loop1..5): coordinates (in the 5 megapixel image) of each loop in the ● detector, using 5 consecutive Region structures. 4.5.6. PresenceDetector Describes a queue detector. The structure corresponds to the version 3. Check 5. Communications protocol (old versions) to see the older versions. Quercus Technologies...
  • Page 135: Light

    Describes a traffic light. The structure corresponds to the version 1. Check 5. Communications protocol (old versions) to see the older versions. Lights Id: unique identifier of the traffic light. ● NumLights (NLg): number of lights in the traffic light. ● Quercus Technologies...
  • Page 136: Redlightdetector

    -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 be used, or because Quercus Technologies...
  • Page 137: Stoppedcardetector

    IsVideoEnabled (isVE): true if video generation at the incidences is enabled, ● false otherwise. PreVideoTimeMs (PreVideoT): time that the start of video recording will be ● advanced since the first picture; in miliseconds. PostVideoTimeMs (PostVideoT): time that the stop of video recording will be ● Quercus Technologies...
  • Page 138: Outputactuatorcondition

    2: driving direction detected ○ 3: detector's occupancy percentage. ○ 4: vehicle presence. ○ Operator (Op): operator used by the condition. ● 0: equal to. ○ 1: different from. ○ 2: greater than. ○ 3: less than. ○ Quercus Technologies...
  • Page 139: Event Messages

    Indicates that one digital input has changed. Type: 0 ● Message Data: ● Bit: identifier of the digital input that changed its value. ● Value (Val): new value. ● 4.6.2. Notification Indicates that a notification of type “Code” has been received. Quercus Technologies...
  • Page 140: Summaryinformation

    00:00 hours on the first of January of 1970. DetectorId: identifier of the detector that generated the summary. ● DetectorType (Type): type of detector that generated the summary: ● 1: speed detector. ○ 2: queue detector. ○ 3: presence detector. ○ 4: red light detector. ○ Quercus Technologies...
  • Page 141: Incidenceinformation

    For more information about length, speed and occupation distributions, see SmartLoop ® user manual. 4.6.4. IncidenceInformation Indicates that an incidence has been received. The structure corresponds to the version 2. Check 5. Communications protocol (old versions) to see the older versions. Type: 3 ● Quercus Technologies...
  • Page 142 AmberLightTime (AmberLightT): time spent with amber light active, before ● turned to red and generated the incidence. MaxStopTime: minimum amount of time the vehicle has to be stopped once red ● light is on, in order for the offence to be generated; in milliseconds. Quercus Technologies...
  • Page 143: Realtimeinformation

    WrongWay (WW): true if the direction of the detected vehicle is incorrect, and ● false if the direction is correct. Occupation: occupancy percentage of the detector. ● IsOccupied (IsOc): true if the detector reports vehicle presence, and false if free. ● Field operational only in a presence detector. Quercus Technologies...
  • Page 144: Query Messages

    Query to receive the last real time event generated at a specific detector. Query Type: 33 ● Message Data: ● DetectorId DetectorId: detector to which the query is requested . ● Answer Type: 65 ● Message Data: ● Quercus Technologies...
  • Page 145: Statusquery

    IsOccupied (IsOc): true if the detector reports vehicle presence, and false if free. ● Field operational only in a presence detector. 4.7.3. StatusQuery Query to receive the system status of the unit. Query Type: 34 ● Message Data: no message data ● Answer Type: 66 ● Message Data: ● StartupTime Quercus Technologies...
  • Page 146: Ioquery

    0. Possible values: 1 enabled, 0 disabled. The 24 bits left will be ignored, available for future revisions. 4.7.5. ImageQuery Query to transfer an image. The image is divided in packets of maximum size 64000 bytes, to optimize the transfer. Query Quercus Technologies...
  • Page 147: Snapshotquery

    The focus value will be calculated from the rectangle in the image. Zoom to true, incorrect rectangle: incorrect combination; returns false. ● Zoom to true, correct rectangle: the image obtained corresponds to a zoomed zone of ● Quercus Technologies...
  • Page 148 Offset: starting position (in the image buffer) of the packet to transfer; in bytes. ● Length: maximum length of the packet to transfer. ● Answer Type: 69 ● Message Data: ● Focus NumDetectors Inputs DStatus NumRedLights RedLights 64000 Outputs ImageSize Length Buffer Quercus Technologies...
  • Page 149: Unittasksquery

    Query to receive the status of the tasks a unit must perform. Query Type: 38 ● Message Data: no message data. ● Answer Type: 70 ● Message Data: ● SInp SendInputChanges (SInp): if true, notifications to central system about changes ● Quercus Technologies...
  • Page 150: Detectortasksquery

    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...
  • Page 151: Detectorinformationquery

    The structures correspond to the version 3. Check 5. Communications protocol (old versions) to see the older versions. Query Type: 41 ● Message Data: ● Index Index: identifier of the detector to inform about. ● Answer (red light detector) Type: 73 ● Message Data: ● RLDetect Quercus Technologies...
  • Page 152 ● PresDetect PresenceDetector (PresDetect): description detector, using ● PresenceDetector structure. Answer (queue detector) Type: 76 ● Message Data: ● QueDetect QueueDetector (QueDetect): description of the detector, using a QueueDetector ● structure. Answer (stopped cadr detector) Type: 79 ● Quercus Technologies...
  • Page 153: Trafficlightscountquery

    Request of information about a configured traffic light in the unit. The structures correspond to the version 1. Check 5. Communications protocol (old versions) to see the older versions. Query The structure corresponds to the version 1. Type: 46 ● Message Data: ● Quercus Technologies...
  • Page 154: Setunittasksquery

    Currently, only one task is possible to configure, inform about the changes at digital inputs. Query Type: 47 ● Message Data: ● SInp SendInputChanges (SInp): if true, informing the central system about the ● changes at the digital inputs is enabled; false disabled. Answer ACK/NAK Quercus Technologies...
  • Page 155: Setdetectortasksquery

    Request to activate a digital output. Query Type: 49 ● Message Data: ● Time Bit: number of the digital output to activate. ● Time: time that the digital output will be active; in milliseconds. A Value of -1 ● Quercus Technologies...
  • Page 156: Rebootquery

    ACK/NAK 4.7.17. VideoQuery Query to transfer a video file. The file is divided into packets of maximum 64000 bytes, in order to optimize the transfer. Query Type: 52 ● Message Data: ● Offset Length Id: incidence identifier. ● Quercus Technologies...
  • Page 157: Confirmation Messages

    Informs that a message was not correctly received, interpreted or executed. Type: 193 ● Message Data: ● ErrorCode (EC): identifier of the type of error generated. ● 0 (Unknown message): the message has a correct format but its meaning is ○ unknown. Quercus Technologies...
  • Page 158 8 (Bad authorization): does not exist the authorization to process such ○ request. The library VL is shared among various family products of Quercus Technologies, so there are functions not enabled for certain products. ErrorSubCode (ESC): additional information about the error produced.
  • Page 159: Configuration Messages

    The format of these messages, as well as the communications protocol, is identical to the rest of messages, however, communication messages don't have to come from the IP address Quercus Technologies...
  • Page 160: Ping

    Port: port where the configuration system must send the answer. ● Answer ACK/NAK 4.9.2. Login Obtains access to unit's configuration system. Query Type: 128 ● Message Data: ● Port Password Password: configuration system's password. ● Port: port where the configuration system must send the answer. ● Answer Quercus Technologies...
  • Page 161: Logout

    SessionId SessionId: session identifier obtained at the last valid “Login”. ● Answer ACK/NAK 4.9.4. PasswordChange Changes the configuration system password. This change is not effective until changes are applied. Query Type: 130 ● Message Data: ● SessionId Password Quercus Technologies...
  • Page 162: Synctime

    Answer ACK/NAK 4.9.6. SetTime Sets indicated date and time. Query Type: 132 ● Message Data: ● SessionId Time SessionId: session identifier obtained at the last valid “Login”. ● Time: time in seconds elapsed since 01/01/1970 00:00:00 h. ● Quercus Technologies...
  • Page 163: Updatefirmware

    4.9.8. RestoreFirmware Restores the factory original firmware and reboots the unit. After using this message, the value of “SessionId” is invalid. Query Type: 134 ● Message Data: ● SessionId SessionId: session identifier obtained at the last valid “Login”. ● Quercus Technologies...
  • Page 164: Formatrwpartition

    SessionId: session identifier obtained at the last valid “Login”. ● Answer ACK/NAK 4.9.10. ExportLog Exports the log file of the specified subsystem, leaving it at the unit's ftp server root. Query Type: 136 ● Message Data: ● SessionId FileName Quercus Technologies...
  • Page 165: Systeminfo

    The structures correspond to the version 1. Check 5. Communications protocol (old versions) to see the older versions. Query The structure corresponds to the version 1. Type: 137 ● Message Data: ● SessionId SessionId: session identifier obtained at the last valid “Login”. ● Answer Type: 181 ● Message Data: ● Quercus Technologies...
  • Page 166: Exportstatus

    SessionId: session identifier obtained at the last valid “Login”. ● FileName: name that has to be given to file stored in FTP root. ● Answer ACK/NAK 4.9.13. ImportConfiguration Imports the configuration from a file in the unit's ftp server root. Quercus Technologies...
  • Page 167: Exportconfiguration

    FileName: filename in the unit's ftp server root, where the configuration will be ● exported. Answer ACK/NAK 4.9.15. ApplyChanges Apply the changes made to system variables and reboots the unit. After using this message, the value of “SessionId” is invalid. Quercus Technologies...
  • Page 168: Discardchanges

    Message Data: ● SessionId SessionId: session identifier obtained at the last valid “Login”. ● Answer ACK/NAK 4.9.17. Restart This query has been designed exclusively for use after formatting the data drive (see 4.9.9. FormatRWPartition). Query Type: 143 ● Quercus Technologies...
  • Page 169: Getentriescount

    SessionId: session identifier obtained at the last valid “Login” ● Answer Type: 182 ● Message Data: ● EntriesCount EntriesCount: number of variables. ● 4.9.19. GetEntry Obtains information about a variable specified by its index or by its name. Quercus Technologies...
  • Page 170: Setentry

    Description1: description of the variable in default language. ● Description2: description of the variable in user configured language. ● 4.9.20. SetEntry Change the value of the variable specified by its name. Query Type: 152 ● Message Data: ● SessionId Name Value Quercus Technologies...
  • Page 171: Restoreentry

    Name: name of the variable to restore. ● Answer ACK/NAK 4.9.22. GetDetectorsCount Obtains the number of detectors in the configuration system. Query Type: 160 ● Message Data: ● SessionId SessionId: session identifier obtained at the last valid “Login” . ● Quercus Technologies...
  • Page 172: Removedetector

    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 ACK/NAK 4.9.24. GetDetector Obtains information about a detector. The structures correspond to the version 3. Check 5. Communications protocol (old versions) to see the older versions. Quercus Technologies...
  • Page 173 Answer (presence detector) Type: 185 ● Message Data: ● Detector Detector: detector description, using a structure PresenceDetector. ● Answer (queue detector) Type: 186 ● Message Data: ● Detector Detector: detector description, using a structure QueueDetector. ● Answer (red light detector) Quercus Technologies...
  • Page 174: Setpresencedetector

    ● 4.9.25. SetPresenceDetector Add or modify a presence detector in the configuration system. Query The structure corresponds to the version 3. Check 5. Communications protocol (old versions) to see the older versions. Type: 163 ● Message Data: ● Quercus Technologies...
  • Page 175: Setqueuedetector

    SessionId: session identifier obtained at the last valid “Login”. ● Action (Act): action : ● 0: modify the existing detector. ○ 1: add a new detector. ○ PeviousId: if an existing detector is modified, this parameter must indicate the ● Quercus Technologies...
  • Page 176: Setredlightdetector

    -1. Detector: detector description, using a structure RedLightDetector. ● Answer 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. Quercus Technologies...
  • Page 177: Setspeeddetector

    4.9.29. SetStoppedCarDetector Add or modify a stopped car detector in the configuration system. Query The structure corresponds to the version 3. Check 5. Communications protocol (old versions) to see the older versions. Type: 172 ● Message Data: ● Quercus Technologies...
  • Page 178: Gettrafficlightscount

    See 4.8.2. NAK. 4.9.30. GetTrafficLightsCount Obtains the number of traffic lights in the configuration system. Query Type: 167 ● Message Data: ● SessionId SessionId: session identifier obtained at the last valid “Login”. ● Answer Type: 189 ● Message Data: ● Quercus Technologies...
  • Page 179: Removetrafficlight

    ACK/NAK 4.9.32. GetTrafficLight Obtains information about a traffic light in the configuration system. The structures correspond to the version 1. Check 5. Communications protocol (old versions) to see the older versions. Query Type: 169 ● Message Data: ● Quercus Technologies...
  • Page 180: Settrafficlight

    Add or modify a traffic light in the configuration system. Query The structure corresponds to the version 1. Check 5. Communications protocol (old versions) to see the older versions. Type: 170 ● Message Data: ● SessionId PreviousId SessionId: session identifier obtained at the last valid “Login”. ● Quercus Technologies...
  • Page 181: Getlanguage

    SessionId: session identifier obtained at the latest valid “Login”. ● Response Type: 197 ● Message Data: ● Language Language: language configured, indicated as a 2-character code (ISO 639-1) ● ending with the character \0. 4.9.35. SetLanguage Sets the language of the configuration system. Quercus Technologies...
  • Page 182: Setlanguage

    Obtains the number of output actuators in the configuration system. Query Type: 167 ● Message Data: ● SessionId SessionId: session identifier obtained at the last valid “Login”. ● Answer Type: 189 ● Message Data: ● OACount OutputActuatorsCount (OACount): number output actuators ● configuration system. Quercus Technologies...
  • Page 183: Removeoutputactuator

    Message Data: ● SessionId Index OutputActuatorId SessionId: session identifier obtained at the last valid “Login”. ● Index: output actuator position in the output actuator collection of the ● configuration system (starting from zero) OutputActuatorId: output actuator identifier. ● Quercus Technologies...
  • Page 184: Setoutputactuator

    PeviousId: if an existing output actuator is modified, this parameter must ● indicate the old identifier (can have been modified). On the other hand, if a new output actuator is added, it must be set to -1. Answer ACK/NAK Quercus Technologies...
  • 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...
  • Page 186: Common Structures

    Value: value that the actuator acts with. ● OutputId (Oid): digital output identifier that corresponds to the actuator. ● Time: time that the actuator keeps the digital output active; in milliseconds. ● 5.1.2. DetectorHeader Version 0: SumPeriod OutAc Coord Type NOut Quercus Technologies...
  • Page 187: Speeddetector

    Version 1 and 2 (are the same): Length Loop1 Loop2 Head Calc Distance Header (Head): description detector's common features, using ● DetectorHeader structure of version 0. CalculateMetrics (Calc): true if metric calculation is enabled at the detector, false ● Quercus Technologies...
  • Page 188: Queuedetector

    The detector coordinates (“Header/Coordinates”) and the loops (“Loops”) are defined in the 0.3 megapixel image. The rest of the fields have the same meaning of version 1. 5.1.5. PresenceDetector Version 1 and 2 (are the same): Loop1 Header Quercus Technologies...
  • Page 189: Trafficlight

    Calc Distance Length DelayTime Loop2 RedInput AmberInput IsVE PreVideoT PostVideoT TrafficLightId LastPictureD. Header (Head): description detector's common features, using ● DetectorHeader structure of version 0. CalculateMetrics (Calc): true if metric calculation is enabled at the detector, false ● Quercus Technologies...
  • Page 190 ● incidence will be delayed; in miliseconds. Version 1: Loop1 Calc Distance Length DelayTime Header Loop2 RedInput AmberInput IsVE PreVideoT PostVideoT TrafficLightId The field ”LastPictureDelayTimeMs” doesn't exist. The rest of fields have the same meaning of version 2. Quercus Technologies...
  • Page 191: Stoppedcardetector

    -1. IsVideoEnabled (isVE): true if video generation at the incidences is enabled, ● false otherwise. PreVideoTimeMs (PreVideoT): time that the start of video recording will be ● advanced since the first picture; in miliseconds. Quercus Technologies...
  • Page 192: Event Messages

    Version 0: Type ImgTime NImg DetectorId Speed DelayTime ElapsedTime The fields “MaxStopTime”, “TotalStoppedTime”, ”VideoInformation” and “AmberLightTime” don't exist. The rest of fields have the same meaning of the version 1. 5.3. Query messages 5.3.1. SnapshotQuery Version 0: Query Quercus Technologies...
  • Page 193: Detectorinformationquery

    Answer The structure related to the trafficlight description has changed; the version of this message defines the version of the trafficlight structure. See the obsolete version of the TrafficLight Quercus Technologies...
  • Page 194: Configuration Messages

    The structure related to the detector description has changed; the version of this message defines the version of the detector structure. See the obsolete versions of each detector type. 5.4.3. SetPresenceDetector Versions 0, 1 and 2: Query The structure related to the detector description has changed; version of this message defines Quercus Technologies...
  • Page 195: Setqueuedetector

    See the obsolete versions of SpeedDetector. 5.4.7. SetStoppedCarDetector Versions 0, 1 and 2: Query The structure related to the detector description has changed; the version of this message defines version detector structure. obsolete versions StoppedCarDetector. 5.4.8. GetTrafficLight Version 0: Query Quercus Technologies...
  • Page 196: Settrafficlight

    See the obsolete versions of TrafficLight. 5.4.9. SetTrafficLight Version 0: Query The structure related to the trafficlight description has changed; version of this message defines the version of the trafficlight structure. See the obsolete versions of TrafficLight. Quercus Technologies...
  • Page 197: Configuration

    The file structure is fixed but the parameters described may differ depending on the simulated product. The file is divided into sections, defined between brackets, with their parameters described below (one per line). [Communications] parameter1=value1 parameter2=value2 [Global] parameter1=value1 [Engine] parameter1=value1 [IO] parameter1=value1 Quercus Technologies...
  • Page 198: Detectors Configuration File

    Description of the detector; X indicates the detector identifier (from 1 to the total amount of defined detectors). The structure changes depending on the detector type. Common parameters. Id: Detector identifier. ● Type: detector type. ● PRESENCE: presence detector. ○ Quercus Technologies...
  • Page 199: Simulation Configuration

    480 pixels long (like a real SmartLoop ® TS unit) contains four identical lanes of 25 meter wide and 4.5 long. Vehicles always drive on the centre of the right lane but the driving direction can be defined by the user. Quercus Technologies...
  • Page 200 For example, if it indicates that the vehicle 'v1' is at position 0 and after 3000 milliseconds is set to 2000, the simulator assumes that between these instructions (3000 milliseconds) the vehicle has been moving at Quercus Technologies...
  • Page 201: Instructions

    The simulator is available in two versions. "TSSimuGui" has a graphical interface and "TSSimu" runs on command line. Both offer the same functionality. The simulator will be started by opening a console (both Windows and Linux) and from the "Bin" folder, the following command must be invoked: Quercus Technologies...
  • Page 202 FLog: path (absolute or relative) to the log file generated by TSSimu. ● DPersistent: folder where summaries will be stored (simulates the Log/ folder of the ● unit FTP). The simulator will create the sub-folder “Summaries” (if it don't exist). FSimulation: file that contains the simulation instructions. ● Quercus Technologies...
  • Page 203: Graphical Interface

    Simulation speed: controls the simulation speed, as well as pause and resume the ● simulation. Note that, although the speed varies, this does not affect to the speeds calculated by the unit. Events: list of the most recent events. ● Quercus Technologies...
  • Page 204: Configuration

    The file structure is fixed but the parameters described may differ depending on the simulated product. The file is divided into sections, defined between brackets, with their parameters described below (one per line). [Communications] parameter1=value1 parameter2=value2 [Global] parameter1=value1 [Engine] parameter1=value1 [IO] parameter1=value1 Quercus Technologies...
  • Page 205: Detectors Configuration File

    RL installation folder: “Simulation/Simulation Type/Data/Detectors.ini” 7.1.2.1. Globals section NumDetectors: number of defined detectors. ● NumTrafficLights: number of defined traffic lights. ● 7.1.2.2. DetectorX section Description of the detector; X indicates the detector identifier (from 1 to the total amount of Quercus Technologies...
  • Page 206 Only available in BirdWatch ® RL Plus simulation. CalculateMetrics: enables the calculation of metrics. 0, disabled; 1, enabled. ● Distance: horizontal distance between the unit and the detector; in millimetres. ● Length: detector length; in millimetres. ● Quercus Technologies...
  • Page 207: Trafficlight_X Section

    Simulated unit is focusing on four lanes from zenith position. The resulting image, 640 pixels wide and 480 pixels long (like a real SmartLoop ® TS unit) contains four identical lanes of 25 meter wide and 4.5 long. Vehicles always drive on the centre of the right lane but the driving Quercus Technologies...
  • Page 208 Unit events: all lines representing events (or state changes) will have a common ● format: Moment, Event type, Event parameters Moment: time (in milliseconds) when the event occurs. The time is calculated in ● Quercus Technologies...
  • Page 209: Vehicle Movement Event

    Milliseconds that the simulator has to wait from the performance of an instruction to the ● execution of the next one. Vehicle type. ● Car1: car, model 1. ○ Car2: car, model 2. ○ Van1: van, model 1. ○ Van2: van, model 2. ○ Truck1: truck, model 1. ○ Quercus Technologies...
  • Page 210: Example

    ○ 1: active. ○ 7.2.2.2. Example Example of activation/deactivation of digital inputs. At the beginning, both 1 and 2 inputs are activated. The first remains active for 5 seconds and the second only 3. After 5 seconds (when Quercus Technologies...
  • Page 211: Example

    4 seconds, then 2 seconds to amber before turning into red again. #0ms at the startup, is defined as red. 0,TrafficLight,Red #3000ms later is changes to green. 3000,TrafficLight,Green #4000ms later changes to amber 4000,TrafficLight,Amber #2000ms later changes to red again. 2000,TrafficLight,Red Quercus Technologies...
  • Page 212: Simulator

    ● I/O events: notes if the unit has been configured to send events when the state of ○ digital inputs and outputs changes. This feature is configured through Globals.ini, VL library or the diagnosis tool. I/O card: ● Quercus Technologies...
  • Page 213: Simulation Example

    1000ms 2000ms 3000ms 4000ms 5000ms 6000ms 7000ms Truck1 driving Car2 driving Input0 active Input1 active Tr.Lights green amber #startup, traffic light is green. 0,TrafficLight,Green #startup, truck1 driving from the image bottom. 0,Truck1,1,-10000 #1000ms later, input 0 active. 1000,Input,0,1 Quercus Technologies...
  • Page 214 #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 red. 0,TrafficLight,Red #2000ms later, input 1 inactive. 2000,Input,1,0 #after 2000ms, end of movement of car2 on the image top. 2000,Car1,2,35000 Quercus Technologies...
  • Page 215: Additional Functions

    See 8.2.2. SFTP server. 8.1.1. XML files 8.1.1.1. Presence summary The name of the XML file is <SummaryId>.xml , where “SummaryId” is the summary identifier left padded with zeros until reaching eight digits. The contents of the file is the following: Quercus Technologies...
  • Page 216: Queue Summary

    The contents of the file is the following: Summary: contains all data from the summary. ● Unit: unit identifier. ● Detector: detector identifier. ● DetectorType: type of detector; QUEUE for a queue detector. ● Quercus Technologies...
  • Page 217 For deeper information about occupation distribution, see SmartLoop user manual. ® Example of XML file: <?xml version="1.0" encoding="UTF-8"?> <Summary> <Unit>1</Unit> <Detector>1</Detector> <DetectorType>QUEUE</DetectorType> <Period> <From> <Seconds>1273153006</Seconds> <Date>2010-05-06</Date> <Time>15:36:46</Time> </From> <To> <Seconds>1273153366</Seconds> <Date>2010-05-06</Date> <Time>15:42:46</Time> </To> </Period> <DistributionOccupation> <Number>6</Number> <UnknownPercentage>0</UnknownPercentage> <Range1> <InferiorLimit>0</InferiorLimit> <SuperiorLimit>20</SuperiorLimit> <Percentage>29</Percentage> </Range1> <Range2> <InferiorLimit>20</InferiorLimit> Quercus Technologies...
  • Page 218: Speed Summary

    AvgSpeed: average speed: in kilometres per hour. If speed calculation was not ● possible for all vehicles, its value will be -1. AvgLength: average length of vehicles: in millimetres. If length calculation was ● not possible for all vehicles, its value will be -1. Quercus Technologies...
  • Page 219 <?xml version="1.0" encoding="UTF-8"?> <Summary> <Unit>1</Unit> <Detector>1</Detector> <DetectorType>SPEED</DetectorType> <Period> <From> <Seconds>1273153434</Seconds> <Date>2010-05-06</Date> <Time>15:43:54</Time> </From> <To> <Seconds>1273153794</Seconds> <Date>2010-05-06</Date> <Time>15:49:54</Time> </To> </Period> <Volume>43</Volume> <AvgHeadway>8</AvgHeadway> <AvgSpeed>39</AvgSpeed> <AvgLength>7069</AvgLength> <DistributionSpeed> <Number>3</Number> <UnknownPercentage>0</UnknownPercentage> <Range1> <InferiorLimit>0</InferiorLimit> <SuperiorLimit>50</SuperiorLimit> <Percentage>20</Percentage> </Range1> <Range2> <InferiorLimit>50</InferiorLimit> <SuperiorLimit>100</SuperiorLimit> <Percentage>27</Percentage> </Range2> <Range3> Quercus Technologies...
  • Page 220: Red Light Incidence

    TimeStamp: timestamp when the image was captured. ● Seconds: showed in seconds since 00:00h on 01-01-1970. ● USecons: microseconds past the second Seconds (previous field). ● For a better timestamp accuracy. Date: date showed with format yyyy-mm-dd (year-month-day). ● Quercus Technologies...
  • Page 221 DelayTime: minimum time elapsed since the red light activation to the creation ● of the incidence for this to be considered as valid; in milliseconds. User configured. <?xml version="1.0" encoding="UTF-8"?> <Incidence> <Id>3</Id> <Type>RED_LIGHT_VIOLATION</Type> <Unit>1</Unit> Quercus Technologies...
  • Page 222: Stopped Car Incidence

    The contents of the file is the following: Incidence: contains all data from the incidence. ● Id: incidence identifier. ● Type: incidence type. STOPPED_CAR_VIOLATION for a stopped car incidence. ● Quercus Technologies...
  • Page 223 ● (hours:minutes:seconds:microseconds). Duration: video duration; in miliseconds. ● Width: width of image in the video; in pixels.Incidence: contains all data ● from the incidence Height: height of the image in the video; in pixels. ● Quercus Technologies...
  • Page 224 <FileName>00000002_2.jpg</FileName> <TimeStamp> <Seconds>1340701741</Seconds> <USeconds>984000</USeconds> <Date>2012-06-26</Date> <Time>11:09:01.984000</Time> </TimeStamp> </Image2> <Image3> <FileName>00000002_3.jpg</FileName> <TimeStamp> <Seconds>1340701746</Seconds> <USeconds>316000</USeconds> <Date>2012-06-26</Date> <Time>11:09:06.316000</Time> </TimeStamp> </Image3> </Images> <Video> <FileName>00000002.avi</FileName> <IniTimeStamp> <Seconds>1340701738</Seconds> <USeconds>976000</USeconds> <Date>2012-06-26</Date> <Time>11:08:58.976000</Time> </IniTimeStamp> <EndTimeStamp> <Seconds>1340701739</Seconds> <USeconds>976000</USeconds> <Date>2012-06-26</Date> <Time>11:08:59.976000</Time> </EndTimeStamp> <Duration>1000</Duration> <Width>640</Width> <Height>480</Height> <Framerate>1</Framerate> </Video> <MaxStopTime>2500</MaxStopTime> Quercus Technologies...
  • Page 225: Jpeg File

    However, this features can be implemented programming directly with the communications protocol. 8.2.1. Encryption format The implemented encryption algorithm is AES in its variations AES-128, AES-192 or AES-256 depending on the password length. The block encryption mode is CBC (Cipher-block chaining) Quercus Technologies...
  • Page 226 AES 256 for passwords between 25 and 32 characters. The AES key will be obtained with the password and the rest of bytes set to zero until the total length of the key is filled. 1-16 AES-128 Password Padding(000...) 17-24 AES-192 Password Padding(000...) 25-32 AES-256 Password Padding(000...) Quercus Technologies...
  • Page 227: Sftp Server

    SFTP is enabled instead, that allows communications encryption, and increases security and confidentiality of stored summaries and incidences. To access to stored data: : sftp://<ip_of_the_unit>/Log/Incidences ● sftp://<ip_of_the_unit>/Log/Summaries ● If the integration tool is enabled: sftp://<ip_of_the_unit>/Log/Integration/SetX (where 'X' is the Set identifier). ● Quercus Technologies...
  • Page 228 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 contact us through our web pages: www.quercus.biz ● www.quercus-technologies.com ● www.quercus.com.br ● Quercus Technologies...

This manual is also suitable for:

Birdwatch red lightSmartloop ts plus

Table of Contents