quercus SmartLoop TS, BirdWatch Red Light, SmartLoop TS Plus Programming Manual

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
QuercusVL Programming Manual (v 1.5.0)
March 2014
© 2014 Quercus Technologies. All rights reserved.
This manual, including the information of the system described within the manual, is provided 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 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
Index
1. Introduction..................................................................................14
2. Basic Programming........................................................................16
2.1. C++......................................................................................16
2.1.1. Memory management.........................................................18
2.1.2. Build of executable.............................................................19
2.2. C...........................................................................................20
2.2.1. Memory management.........................................................22
2.2.2. Build of executable.............................................................23
2.3. Other examples.......................................................................23
3. Reference Class.............................................................................24
3.1. Compatibility 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 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.10.1. Properties.......................................................................41
3.10.2. Methods..........................................................................43
3.11. PresenceDetector Class...........................................................44
3.12. QueueDetector Class..............................................................44
3.13. SpeedDetector Class...............................................................45
3.13.1. Properties.......................................................................45
3.14. RedLightDetector Class...........................................................46
3.14.1. Properties.......................................................................46
3.15. Class StoppedCarDetector.......................................................48
3.15.1. Properties.......................................................................49
3.16. TrafficLights Class..................................................................50
3.16.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. 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.24.1. Properties.......................................................................63
3.24.2. Methods..........................................................................63
3.25. Incidence Class......................................................................64
3.25.1. Properties.......................................................................64
3.25.2. Methods..........................................................................67
3.26. Images Class.........................................................................67
3.26.1. Properties.......................................................................68
3.27. Image Class..........................................................................68
3.27.1. Properties.......................................................................68
3.27.2. Methods..........................................................................69
3.28. Video Class ..........................................................................69
3.28.1. Properties.......................................................................69
3.28.2. Methods..........................................................................71
3.29. Summary Class......................................................................72
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. 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.38. Configuration Class................................................................82
3.38.1. Methods..........................................................................83
3.39. ConfigurationDetector Class.....................................................94
3.39.1. Properties.......................................................................94
3.39.2. Methods..........................................................................98
3.40. ConfigurationPresenceDetector Class .......................................98
3.41. ConfigurationQueueDetector class............................................99
3.42. ConfigurationSpeedDetector class.............................................99
3.42.1. Properties.......................................................................99
3.43. ConfigurationRedLightDetector class.......................................100
3.43.1. Properties.....................................................................100
3.44. ConfigurationStoppedCarDetector Class...................................105
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. 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
3.52. SettingsEntry class...............................................................121
3.52.1. Properties.....................................................................121
3.52.2. Methods........................................................................122
3.53. VLDetectorType Type............................................................122
3.54. VLNotificationCode Type........................................................122
3.55. VLIncidenceType Type...........................................................123
3.56. VLLightType Type.................................................................123
3.57. VLFieldType Type.................................................................123
3.58. VLOperatorType Type...........................................................123
3.59. VLTimestampObject Type......................................................124
3.60. VLLogSystem Type...............................................................124
3.61. VLConfigurationActionType Type.............................................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.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.5.11. VideoInformation............................................................138
4.5.12. OutputActuatorCondition.................................................139
4.5.13. OutputActuator..............................................................139
4.6. Event messages.....................................................................140
4.6.1. InputChanged..................................................................140
4.6.2. Notification......................................................................140
4.6.3. SummaryInformation........................................................141
4.6.4. IncidenceInformation........................................................142
4.6.5. RealTimeInformation........................................................144
4.7. Query messages ...................................................................144
4.7.1. VersionQuery...................................................................144
4.7.2. RealTimeQuery................................................................145
4.7.3. StatusQuery....................................................................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.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.2. Login..............................................................................161
4.9.3. Logout............................................................................162
4.9.4. PasswordChange..............................................................162
4.9.5. SyncTime........................................................................163
4.9.6. SetTime..........................................................................163
4.9.7. UpdateFirmware...............................................................164
4.9.8. RestoreFirmware..............................................................164
4.9.9. FormatRWPartition...........................................................165
4.9.10. ExportLog.....................................................................165
4.9.11. SystemInfo....................................................................166
4.9.12. ExportStatus..................................................................167
4.9.13. ImportConfiguration.......................................................167
4.9.14. ExportConfiguration........................................................168
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
4.9.34. GetLanguage....................................................................182
4.9.35. SetLanguage.................................................................183
4.9.36. GetOutputActuatorsCount................................................183
4.9.37. RemoveOutputActuator...................................................184
4.9.38. GetOutputActuator.........................................................184
4.9.39. SetOutputActuator..........................................................185
5. Communications protocol (old versions)..........................................187
5.1. Common structures................................................................187
5.1.1. OutputActuator................................................................187
5.1.2. DetectorHeader...............................................................187
5.1.3. SpeedDetector.................................................................188
5.1.4. QueueDetector................................................................189
5.1.5. PresenceDetector.............................................................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. 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
6. Simulator SmartLoop® TS (TSSimu)...............................................198
6.1. Configuration.........................................................................198
6.1.1. General configuration file..................................................198
6.1.2. Detectors configuration file................................................199
6.1.2.1. Globals section...............................................................................199
6.1.2.2. DetectorX section............................................................................199
6.2. Simulation configuration.........................................................200
6.2.1.1. Instructions....................................................................................202
6.2.1.2. Example........................................................................................202
6.3. Simulator..............................................................................202
6.3.1. Graphical interface...........................................................204
7. BirdWatch® RL Simulator (RLSimu)................................................205
7.1. Configuration.........................................................................205
7.1.1. General configuration file..................................................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
7.2.1. Vehicle movement event...................................................210
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
QuercusVL Programming Manual
This manual referes to the QuercusVL® 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
communications, library and software tools.
Quercus Technologies 13
Page 14
QuercusVL Programming Manual
1. Introduction
QuercusVL® units communicates with the client application using the protocol described in the
4. Communications protocol chapter. The protocol is embedded in C and C++ libraries which
are compatible with Microsoft Windows and GNU/Linux.
The advantages and disadvantages of each integration method are described next:
Class library in C++: Dynamically linked library for Windows and GNU/Linux that
provides an object oriented vision of the system. The source code of a proxy in a fully
portable C++ language is provided with the dynamically linked library, which can be
used with any C++ compiling program, the library manages the simultaneous and
transparent communications with various lanes. It implements a high level interface
which facilitates the programming tasks in C++. Available for Windows or GNU/Linux
systems.
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 proxy in a fully portable C language is provided with the
library, which can be used with any C compiling program. It also manages the
simultaneous and transparent communications with various lanes. Allows programming
with C while keeping the high level vision provided by the C++ library. It can be used
with both C and C++ languages. Available for Windows or GNU/Linux systems.
Through UDP protocol of QuercusVL
®
: the definitions of the protocol used for the
communication activities are provided in a header file (VL.h) including examples of use,
programmed in 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 14
Page 15
QuercusVL Programming Manual
The relationship between the different layers can be seen in the following diagram (where it is
assumed that the client application is programmed in C++).
As the figure shows, the two high level programming methods (C/C++) are merely successive
layers around 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 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 15
Client computer
Client application
Proxy C++
Proxy C
QuercusLV ®
Unit
UDP Protocol
QuercusVL ®
Unit
Dinamic-Link
Library
Page 16
QuercusVL Programming Manual
2. Basic Programming
The following pages describes the required steps to develop a minimum program capable of
receiving the information generated in a unit.
Basic programming knowledge is assumed to tackle this chapter (C and C++). If you usually
work with some of these technologies, you will have no problem following the examples.
The source code of the examples is found in <installation folder>/Samples.
2.1. C++
The method used by the C++ library to generate events, so that the client application is in
charge of the implementation, is forcing the client application to implement a class according
to a specific interface. When an event occurs in a detector (for instance, generation of a real
time event), the library will call the 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 about threads or unable to be executed
out of the main thread, cannot not be used for the implementation.
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> #include "VLWrapperCpp"
using namespace VL;
class CEventHandler: public ISystemEH { public:
virtual void OnRealTimeInformation(RealTimeInformation info) {
printf("OnRealTimeInformation (%d,%d)",
info.get_Unit().get_Id(),info.get_DetectorId());
switch(info.get_DetectorType()) {
case DT_SPEED: printf("DT_SPEED\n"); break; case DT_QUEUE: printf("DT_QUEUE\n"); break; case DT_PRESENCE: printf("DT_PRESENCE\n"); break; default:break;
}
}
Quercus Technologies 16
Page 17
QuercusVL Programming Manual
virtual void OnIncidence(Incidence inc) {
printf("OnIncidence (%d,%d), %d,"
,inc.get_Unit().get_Id(),inc.get_DetectorId(),inc.get_Id()); switch(inc.get_Type()) {
case IT_RED_LIGHT_VIOLATION: printf("IT_RED_LIGHT_VIOLATION\n");
break;
case IT_STOPPED_CAR_VIOLATION:printf("IT_STOPPED_CAR_VIOLATION\n");
break;
}
if(inc.get_Images().Count()>0) printf("Image 0 secs:%d\n",
inc.get_Images().Item(0).get_Timestamp().get_Seconds()); else printf("Image NOT FOUND\n");
if(inc.get_Video().IsValid()) printf("Video %dx%d duration:%d frameRate:
%d\n",inc.get_Video().get_Width(),inc.get_Video().get_Height(),
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_DetectorType()) {
case DT_SPEED: printf("DT_SPEED\n"); break;
case DT_QUEUE: printf("DT_QUEUE\n"); break;
case DT_PRESENCE: printf("DT_PRESENCE\n"); break;
default:break; }
}
};
CEventHandler EventHandler;
int main(int argc, char *argv[]) { if(VLLoad()==-1) return -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 17
Page 18
QuercusVL Programming Manual
Use VL namespace. All classes are defined inside “VL” namespace to avoid collisions with other
class names.
class CEventHandler: public ISystemEH
Class that will implement the client code to execute with the events. As it is derived from
IsystemEH we force it to implement its abstract methods (“On...”). If you are not interested in
any of the events just leave method implementation empty.
CEventHandler EventHandler;
Object that will catch events.
if(VLLoad()==-1) return -1;
Load of VL library.
if(!System::Initialize("Central.ini","Central.log",&EventHandler)) return -1;
Initialization of VL class library. This must be the first method to be called.
It is responsible to initialize the system, events, and set up networking 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 so that the
library can call its methods when necessary.
From now on, if you start the simulators “TSSimu” or “RLSimu” or the system has been
configured to communicate with real units, the events generated will be received.
System::Terminate();
End of VL library execution.
VLUnload();
Unload of VL library.
2.1.1. Memory management
It must be mentioned that C++ memory management is hidden (using “intelligent” pointers),
in a way that the developer doesn't have to worry about objects creation and removal.
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 18
Page 19
QuercusVL Programming Manual
Detector ExampleOfObjectsUse (Unit unit) { Detector detectorA, detectorB;
detectorA=unit.get_Detectors().Item(0); detectorB=detectorA;
return detectorB; }
Even though the function of the example does not contain useful code, it shows the use made
of objects:
Detector ExampleOfObjectsUse(Unit unit);
The objects can be passed as function parameters without using pointers or references,
and it does not affect application performance.
In a classic C++ objects system, this call would turn into a performance decrease and a
potential source of errors, because it would call the object's copy constructor to pass
the copy as a function parameter. When the 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 copy
constructor is only 4 bytes of memory, and at the destruction of the object's copy, the
real object is never destroyed while there is any copy still to destroy.
detectorA=unit.get_Detectors().Item(0);
detectorB=detectorA;
return detectorB;
All VL methods returns objects, never pointers or references. The developer can freely
manipulate the object (can be duplicated, returned, etc., and it will remain valid).
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 19
Page 20
QuercusVL Programming Manual
2.2. C
The method used by the C library to generate events, so that the client application is in charge
of the implementation, is forcing the client application to implement a class according to a
specific interface. When an event occurs in a detector (for instance, generation of a real time
event), the library will call the 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 about threads or unable to be executed out of the
main thread, cannot not be used for the implementation.
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> #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
} VLDetectorType;
void __stdcall OnRealTimeInformation(int info) {
printf("OnRealTimeInformation (%d ,%d) ",
VL_Unit_get_Id(VL_RealTimeInformation_get_Unit(info)),
VL_RealTimeInformation_get_DetectorId(info));
switch(VL_RealTimeInformation_get_DetectorType(info)) {
case 1: printf("DT_SPEED\n"); break; case 2: printf("DT_QUEUE\n"); break; case 3: printf("DT_PRESENCE\n"); break; default: break;
}
}
void __stdcall OnIncidence(int inc) {
printf("OnIncidence (%d ,%d), %d, ",
VL_Unit_get_Id(VL_Incidence_get_Unit(inc)), VL_Incidence_get_DetectorId(inc),VL_Incidence_get_Id(inc));
switch(VL_Incidence_get_Type(inc)) {
case 1: printf("IT_RED_LIGHT_VIOLATION\n"); break; case 2: printf("IT_STOPPED_CAR_VIOLATION\n"); break; default: break;
}
}
void __stdcall OnSummary(int sum) {
printf("OnSummary (%d ,%d) ",
VL_Unit_get_Id(VL_Summary_get_Unit(sum)),VL_Summary_get_DetectorId(sum));
Quercus Technologies 20
Page 21
QuercusVL Programming Manual
switch(VL_Summary_get_DetectorType(sum)) {
case 1: printf("DT_SPEED\n"); break; case 2: printf("DT_QUEUE\n"); break; case 3: printf("DT_PRESENCE\n"); break; default: break;
}
}
int main(int argc, char *argv[]) { if(VLLoad()!=0) return -1;
if(!VL_System_Initialize("Central.ini","Central.log", OnRealTimeInformation, OnIncidence, OnSummary, NULL, NULL)) return -1;
printf("Press [RETURN] to exit\n"); getchar();
VL_System_Terminate(); VLUnload();
return 0; }
Parts of the sample code:
include “VLWrapperC.h”
Header files needed to interact with VL from C.
void __stdcall OnRealTimeInformation(int info)
void __stdcall OnIncidence(int inc)
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 compilation time.
If you are not interested in any of the events, you don't need to implement it.
if(VLLoad()!=0) return -1;
Load of VL library.
if(!VL_System_Initialize("Central.ini","Central.log", OnRealTimeInformation,
OnIncidence, OnSummary, NULL, NULL)) return -1;
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 21
Page 22
QuercusVL Programming Manual
From now on, if you start “TSSimu” or “RLSimu” or real units are configured, you will start
receiving events.
VL_System_Terminate();
Stops VL class library execution.
VLUnload();
Unloads VL library.
2.2.1. Memory management
Memory management at C library must be done using the methods AddRef ( ) and Release ( )
inside the classes Detector, TrafficLight, RealTimeInformation, Incidence, Summary, Image,
Video, Configuration, ConfigurationDetector, ConfigurationTrafficLight y SettingsEntry:
AddRef
C: void Class_AddRef ( int h )
The function adds a reference to the object. Necessary when copying the object. When
the object is no more needed, the function 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 memory, if the
number of references reach 0. It should be called, when the object to which a reference
was added (see AddRef), is no longer needed; or when an object that was obtained
calling a function that returned a handler of it, is no longer needed (already explained
in these methods, internally, the system calls to method AddRef).
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 22
Page 23
QuercusVL Programming Manual
2.2.2. Build of executable
Visual Studio
Open “Samples.dsw” environment located at “Samples” 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 VL sample code. The named folder also
contains a “Readme.txt” file describing each sample code.
Quercus Technologies 23
Page 24
QuercusVL Programming Manual
3. Reference Class
In the following reference you will find the syntax of the two programming languages (C and
C++). As they bring the same functionality, they are documented together, pointing out
possible differences between them where necessary.
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:
SmartLoop
®
TS
SmartLoop
®
TS Plus
BirdWatch
®
RL
BirdWatch
®
RL Plus
Events
OnRealTimeInformation
OnSummary
OnIncidence
OnNotification
OnInputChange
Classes
System
Units
Unit
UnitStatus
VersionInformation
Detectors
Detector
PresenceDetector
QueueDetector
SpeedDetector
RedLightDetector
StoppedCarDetector
TrafficLights
TrafficLight
HistoricIncidences
HistoricSummaries
RealTimeInformation
Quercus Technologies 24
Page 25
QuercusVL Programming Manual
Regions
Region
Lights
Light
Incidence
Images
Image
Video
Summary
SpeedsDistribution
LengthsDistribution
OccupationsDistribution
SpeedsUpperLimit
LengthsUpperLimit
OccupationsUpperLimit
Notification
Timestamp
Configuration
ConfigurationDetector
ConfigurationPresenceDetector
ConfigurationQueueDetector
ConfigurationSpeedDetector
ConfigurationRedLightDetector
ConfigurationStoppedCarDetector
ConfigurationTrafficLight
ConfigurationLights
ConfigurationLight
ConfigurationOutputActuator
ConfigurationOutputActuatorCondition
ConfigurationOutputActuatorConditions
SystemInformation
SettingEntry
Types
VLDetectorType
VLNotificationCode
VLIncidenceType
VLLightType
Quercus Technologies 25
Page 26
QuercusVL Programming Manual
VLFieldType
VLOperatorType
VLConditionOperatorType
VLTimestampObject
VLLogSystem
VLConfigurationActionType
3.2. Hierarchy
The system implements the following hierarchical object division:
System: represents the VL system root. Basically provides a collection of units.
Unit: the logical representation of a unit, directly equivalent to
unit.
Detector: the logical representation of a detector. PresenceDetector, QueueDetector,
SpeedDetector, RedDetector and StoppedCar classes derive from it.
TrafficLight: logical representation of a virtual 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 hierarchy of
Detector and TrafficLight objects is regenerated, starting from zero.
Therefore, when you want to make continued use of these objects, you must save a reference
to it, in order that it will not be modified or destroyed.
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 26
Detector
Unit
System
n
Units
TrafficLight
Summary
Incidence
n
n
n
n
Detectors
TrafficLights
Historic Summaries
Historic Incidences
Page 27
QuercusVL Programming Manual
changed)
Example of correct code (in C++)
detector=Unit(0).Detector(0) // Getting the detector
printf( …, detector.Id); // First use of the detector printf( …, detector.Type); // Second use of the detector (it keeps being the same)
Example of correct code (in C)
detector = VL_Unit_get_Detectors_Item(unit, 0);// Getting the detector
printf( …, VL_Detector_get_Id(detector)); // First use of the detector printf( …, VL_Detector_get_SummariesPeriod(detector)); // Second use of the detector (it keeps
// being 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 execution (after the last call to library functions) to
unload the library.
All boolean values documented for C++ library are translated to C library as:
C++ C
True Integer different from 0
False 0
3.4. System Class
Represents the VL object hierarchy root.
3.4.1. Properties
Status
C++: static bool get_Status ( )
C: 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 27
Page 28
QuercusVL Programming Manual
C++: static Units get_Units( )
C: does not exist
In C++, the collection of units in the system is returned.
In C, there is no representation of the collection “Units”, but methods to directly access
to its properties:
int VL_System_get_Units_Count ( ): number of units in the system.
int VL_System_get_Units_Item ( int item ): returns the unit located at the
specified position inside the unit collection (starting from zero).
If there is no Unit at the specified position, returns null.
int VL_System_get_Units_Id ( int id ): returns the unit with identifier “id” inside
the unit collection.
If there is no Unit for the specified identifier, returns null.
3.4.2. Methods
Initialize
C++: static bool Initialize ( const char *iniFile, const char *logFile, ISystemEH
*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_ONINPUTCHANGE)
Initialize the system with the specified configuration and log files. Returns true if the
system initialized successfully, and false otherwise.
In C++, the function expects path and name of configuration and log files at the
“iniFile” and “logFile” parameters respectively.
In C++, the parameter “systemEH” is a pointer to a ISystemEH derived class object,
needed to launch events.
In C, the pointers to functions (callbacks) must be passed as parameters to launch
events. 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 ( )
C: void VL_System_Terminate ( )
Quercus Technologies 28
Page 29
QuercusVL Programming Manual
Close the system.
3.4.3. Events
In C++, an abstract class ISystemEH has been declared, where the declaration of the methods
that will handle the events is shown. An ISystemEH derived class must be created, and then
implement the corresponding methods of the events you wish to capture.
In C, the functions dealing with the events must be implemented according to the definition of
each one .
OnRealTimeInformation
C++: void OnRealTimeInformation(RealTimeInformation info)
C: void VL_OnRealTimeInformation(int hInfo)
Event launched for a real time event. The parameter “info” receives event data (check
“RealTimeInformation” class).
In C the parameter “hInfo” is a handler of RealTimeInformation. If you need to keep
hInfo element out of 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 free the allocated
memory, when it is no longer needed (see Release method from RealTimeInformation
class).
OnIncidence
C++: void OnIncidence(Incidence incidence)
C: void VL_OnIncidence(int hIncidence)
Event launched when a unit incidence is received. The parameter “incidence”, receives
event data (check “Incidence” class).
In C, the parameter “hIncidence” is a handler of Incidence. If you need to keep
hIncidence element out of the function scope, VL_Incidence_AddRef should be called to
add a reference (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 29
Page 30
QuercusVL Programming Manual
C: void VL_OnSummary(int hSummary)
Event launched for a real time event. The parameter “summary” receives event data
(check “Summary” class).
In C, the parameter “hSummary” is a handler of Summary. If you need to keep
hSummary element out of the function scope, VL_Summary_AddRef should be called to
add a reference (see method AddRef from Summary class), and VL_Summary_Release
to remove the reference and free the allocated memory, when it is no longer needed
(see Release method from Summary class).
OnNotification
C++: void OnNotification(Notification notification)
C: void VL_OnNotification(int hNotification)
Event launched for a 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 valid inside function scope.
OnInputChange
C++: void OnInputChange(Unit unit, int bit, bool value)
C: void VL_OnInputChange(int unit, int bit, bool value)
Event launched when a programmed input (and configured to report changes) of the
I/O board changed its value. The parameter “unit” refers to the unit where the event
has been launched. The parameter “bit” is the bit number (starting from “0” ) that
changed and “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 ( )
C: Does not exist, check VL_System_get_Units_Count ( ) from System.
Number of units in the system.
Quercus Technologies 30
Page 31
QuercusVL Programming Manual
Item
C++: Unit Item ( int item )
C: Does not exist, check VL_System_get_Unit_Item ( ) from System.
Returns the unit located at the specified position inside the units collection. The position
of each unit within the system corresponds to the index defined in the system
initialization file.
if the indicated Unit does not exist, returns an invalid unit (see IsValid from Unit class).
The parameter “item” must specify the position (starting 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 identifier, returns an invalid unit (see IsValid from Unit
class)
3.6. Unit Class
Represents one unit.
3.6.1. Properties
Id
C++: int get_Id ( )
C: int VL_Unit_get_Id (int h)
Unique unit identifier.
In C, the parameter “h” is a handler of the unit (Unit).
Ip
C++: void get_IpAddress ( char *buffer, int bufLen )
C: 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 31
Page 32
QuercusVL Programming Manual
C++: UnitStatus get_Status ( )
C: int VL_Unit_get_Status (int h)
Returns unit status.
In C, the parameter “h” is a handler of the unit (Unit).
Configuration
C++: Configuraton get_Configuration ( )
C: int VL_Unit_get_Configuration (int h)
Returns the configuration system of the unit.
In C++, if there is no reachable configuration system in the unit, returns an invalid one
(see IsValid from Configuration class)
In C, if there is no reachable configuration system in the unit, returns null.
In C, the parameter “h” is a handler of the unit (Unit).
Detectors
C++: Detectors get_Detectors()
C: does not exist
In C++, returns the unit's collection of detectors.
In C, there is no representation of “Detectors” collection, but methods to directly
access 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 position in the detector's collection of unit “h” (starting from zero).
The parameter “h” is a handler of unit (Unit).
If there is no detector at the specified position 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).
int VL_Unit_get_Detectors_Id(int h, int id): returns the detector with identifier
“id”, inside the detectors collection of “h” unit.
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 32
Page 33
QuercusVL Programming Manual
TrafficLights
C++: TrafficLights get_TrafficLights()
C: Does not exist
In C++, the unit's TrafficLights collection is returned.
In C, there is no representation of “TrafficLights” collection, but methods to directly
access to collection properties:
int VL_Unit_get_TrafficLights_Count (int h): returns the number of traffic lights
in the unit “h”
int VL_Unit_get_TrafficLights_Item(int h, int item): returns the TrafficLight
located at the indicated position in the TrafficLights collection of unit “h”
(starting from zero).
If there is no TrafficLights at the specified position returns null.
The parameter “h” is a handler of unit (Unit).
When the traffic light is no longer needed, VL_TrafficLight_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 TrafficLights collection in the unit ”h”.
The parameter “h” is a handler of unit (Unit).
If there is no TrafficLights with such id, returns null.
When the traffic light is no longer needed, VL_TrafficLight_Release must be
called to free allocated memory (see Release method at TrafficLight class).
HistoricIncidences
C++: HistoricIncidences get_HistoricIncidences()
C: int VL_Unit_get_HistoricIncidences(int h)
Returns the incidences record of the unit.
In C, the parameter “h” is a handler of unit (Unit).
HistoricSummaries
C++: HistoricSummaries get_HistoricSummaries()
C: 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 33
Page 34
QuercusVL Programming Manual
3.6.2. Methods
IsValid
C++: bool IsValid ( )
C: does not exist
Returns true if the object contains valid information about a unit, and false is the
information is not valid. Some functions, may sometimes return, void units. In C, this
behaviour is detected as its value will be “0”. In C++, however, this method is
necessary because the object, as it is not a pointer, would always be valid.
Reboot
C++: void Reboot ( )
C: void VL_Unit_Reboot ( int h )
Reboots the unit.
In C, the parameter “h” is a handler of unit (Unit).
GetSnapshot
C++: bool GetSnapshot( int roiRight, int roiTop, int roiLeft, int roiBottom, int
exposureTime, bool zoom, int maxSize, unsigned char* pImageData, int *imageLen, int
*focus, int *numDetectors, int *detectors, 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* pImageData, int*
imageLen, int *focus, int *numDetectors, int *detectors,int *numRedLights,int
*redLights,int *inputValues,int *outputValues)
Makes a snapshot of the unit. Returns a complete status report of detectors, virtual
traffic lights and digital inputs/outputs; as well as a live black and white snapshot JPEG
image of 0.3Mp (640 pixels wide and 480 pixels high).
Returns true if answered successfully, and false otherwise.
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 34
Page 35
QuercusVL Programming Manual
Zoom to false, correct rectangle: the image obtained corresponds to the entire
image captured by the unit. 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 the captured image. The central position of the rectangle coincides with the
central position of the magnified area. The focus value will be calculated from the
enlarged area.
Input parameters:
int roiRight: X value (horizontal axis) from right side of the rectangle; to not define
it, specify -1.
int roiTop: Y value (vertical axis) from upper side of the rectangle; to not define it,
specify -1.
int roiLeft: X value (horizontal axis) from left side of the rectangle; to not define it,
specify -1.
int roiBottom: Y value (vertical axis) from bottom side of the rectangle; to not
define it, specify -1.
int exposureTime: 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 security parameter; if
the buffer size is not big enough, it will not be filled up and it will return false.
Output parameters:
unsigned char* pImageData: pointer where the captured image will be stored. It will
have a maximum size of 524288 bytes.
int* imageLen: size of the obtained image, in bytes.
int *focus: calculated focus coefficient; -1 if not calculated.
int *numDetectors: number of configured detectors.
int *detectors: table with the status of the loops of each detectors; although the size of
it must be 15, only the first numDetectors positions will be written. The detectors will
be located following the same configuration order, and each position will detail the
status of the loops bitwise. 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 35
Page 36
QuercusVL Programming Manual
5, only the first numRedLights positions will be written. The detectors will be located
following the same configuration order . Possible values: 0 “red state”, other value “any
other state”.
int *inputValues: 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 the input zero. Possible
values: 1 enabled, 0 disabled.
int *outputValues: status of the 8 digital outputs. Each one of the first 8 bits
corresponds to the status of an output, being the least significant bit for the output
zero. Possible values: 1 enabled, 0 disabled.
In C, the parameter “h” is a handler of unit (Unit).
ActivateOutput
C++: bool ActivateOutput(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).
GetIOValues
C++: bool GetIOValues(int &inputValues,int &outputValues)
C: int VL_Unit_GetIOValues(int h, int *inputValues, int *outputValues)
Informs about the status of the digital inputs and outputs. Each one of the first 2 bits of
intputValues and 8 bits of outputValues corresponds to the status of an input/output,
being the least significant bit for the input/output zero. Possible values: 1 enabled, 0
disabled.
Returns true if answered successfully, and false otherwise.
In C, the parameter “h” is a handler of unit (Unit).
GetVersion
C++: VersionInformation GetVersion()
C: 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 36
Page 37
QuercusVL Programming Manual
GetRealTimeInformation
C++: RealTimeInfo GetRealTimeInformation(int detectorId)
C: int VL_Unit_GetRealTimeInformation(int h,int detectorId)
Returns the last real time event of the specified unit.
In C++, if there is no real time event for the specified detector, returns an invalid one
(see IsValid from RealTimeInformation class).
In C, the parameter “h” is a handler of unit (Unit).
In C, if there is no real time event for the specified detector, returns null.
In C, when the element is no longer needed, the function
VL_RealTimeInformation_Release must be called (see Release method from
RealTimeInformation class).
SetUnitTasks
C++: bool SetUnitTasks(bool *sendInputChanges)
C: int VL_Unit_SetUnitTasks(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 the query was successful, or false otherwise.
In C, the parameter “h” is a handler of unit (Unit).
SetDetectorTasks
C++: bool SetDetectorTasks(int id, bool enableSummaries, bool
enableIncidences, bool sendSummaries, bool sendIncidences, bool
sendRealTimeInformation)
C: int VL_Unit_SetDetectorTasks(int h, int id, bool enableSummaries, bool
enableIncidences, bool sendSummaries, bool sendIncidences, bool
sendRealTimeInformation)
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)
C: int VL_Unit_GetUnitTasks(int h, int *sendInputChanges)
Quercus Technologies 37
Page 38
QuercusVL Programming Manual
Informs about the status of unit tasks.
Returns true if the query was successful, or false otherwise.
In C, the parameter “h” is a handler of unit (Unit).
GetDetectorTasks
C++: bool GetDetectorTasks(int id, int id, bool *enableSummaries, bool
*enableIncidences, bool *sendSummaries, bool *sendIncidences, bool
*sendRealTimeInformation)
C: int VL_Unit_GetDetectorTasks(int h, int id, int *enableSummaries, int
*enableIncidences, int *sendSummaries, int *sendIncidences, int
*sendRealTimeInformation)
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 Class
Status of the unit.
3.7.1. Properties
Global
C++: bool get_Status()
C: int VL_UnitStatus_get_Status(int h)
Global status of the unit. Returns true if unit's system status is correct, false otherwise.
In C, the parameter “h” is a handler of UnitStatus.
Communication
C++: bool get_Communication( )
C: 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 38
Page 39
QuercusVL Programming Manual
3.8. VersionInformation Class
Information about the firmware or hardware version of the unit.
3.8.1. Properties
Name
C++: void get_Name(char *buffer, int bufLen)
C: void VL_VersionInformation_get_Name(int h, char *buf, int bufLen)
Informs about the name of the version.
In C, the parameter “h” is a handler of version (VersionInformation).
Major
C++: int get_Major()
C: int VL_VersionInformation_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_Minor(int h)
Informs about the Minor value of the version.
In C, the parameter “h” is a handler of version (VersionInformation).
Revision
C++: int get_Revision()
C: 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 39
Page 40
QuercusVL Programming Manual
3.9.1. Properties
Count
C++: int Count ( )
C: Does not exist, check VL_Unit_get_Detectors_Count(int h) of Unit.
Number of detectors in the unit.
Item
C++: Detector Item ( int item )
C: Does not exist, check VL_Unit_get_Detectors_Item(int h, int item) of
Unit.
Returns the detector located at the specified position inside the detector's collection of
the unit. They are located following the same configuration order.
The parameter “item” must indicate the position (starting from zero).
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 Unit.
Returns the detector identified by “id”, inside the detectors collection of the unit.
If there is no Detector for the specified identifier, returns an invalid one (see IsValid
from Detector class).
3.10. Detector Class
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()
C: int Detector_get_UnitId(int h)
Quercus Technologies 40
Page 41
QuercusVL Programming Manual
Returns the unit to which the detector belongs.
In C, the parameter “h” is a handler of detector (Detector).
Id
C++: int get_Id()
C: int VL_Detector_get_Id(int h)
Returns the detector identifier.
In C, the parameter “h” is a handler of detector (Detector).
Type
C++: VLDetectorType get_Type()
C: int VL_Detector_get_Type(int h)
Returns the detector type
In C, the parameter “h” is a handler of detector (Detector).
AreIncidencesEnabled
C++: bool get_AreIncidencesEnabled()
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++: bool get_AreSummariesEnabled()
C: int VL_Detector_get_AreSummariesEnabled(int h)
Returns true if the generation of summaries is enabled, false if disabled.
In C, the parameter “h” is a handler of detector (Detector).
SendRealTimeInformation
C++: bool get_SendRealTimeInformation()
C: 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 41
Page 42
QuercusVL Programming Manual
SendIncidences
C++: bool get_SendIncidences()
C: int VL_Detector_get_SendIncidences(int h)
Returns true if sending incidences is enabled, false if disabled.
In C, the parameter “h” is a handler of detector (Detector).
SendSummaries
C++: bool get_SendSummaries()
C: int VL_Detector_get_SendSummaries(int h)
Returns true if sending summaries is enabled, false if disabled.
In C, the parameter “h” is a handler of detector (Detector).
SummariesPeriod
C++: int get_SummariesPeriod()
C: 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_get_Coordinates(int h)
Returns the coordinates of the detector.
In C, the parameter “h” is a handler of detector (Detector).
LoopsCoordinates
C++: Regions get_LoopsCoordinates()
C: Does not exist
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 42
Page 43
QuercusVL Programming Manual
loops in the detector.
int VL_Detector_get_LoopsCoordinates_Item(int h, int item): returns the
coordinates of the indicated position inside the detector loops coordinates
collection (starting form zero). The returned parameter is a handler of the
coordinates (Region)
If there is no Region for the indicated position, returns null.
The parameter “h” is a handler of detector (Detector).
3.10.2. Methods
IsValid
C++: bool IsValid()
C: Does not exist
Returns true if the object contains valid information 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, as it is not a pointer, would always be valid.
AddRef
C++: Does not exist
C: void VL_Detector_AddRef ( int h )
See 2.2.1. Memory management.
Release
C++: Does not exist
C: void VL_Detector_Release ( int h )
See 2.2.1. Memory management.
3.11. 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 43
Page 44
QuercusVL Programming Manual
if(detector.get_Type() == DT_PRESENCE) {
PresenceDetector myPresenceDetector;
myPresenceDetector = detector; // assignment operator
ProcessPresenceDetector(myPresenceDetector);
}
Example in C
if(Detector_get_Type(hDetector) == PRESENCE) {
ProcessPresenceDetector(hDetector);
}
3.12. QueueDetector Class
Logic representation of a detector of queue 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 queue detector.
Example in C++
if(detector.get_Type() == DT_QUEUE) {
QueueDetector myQueueDetector;
myQueueDetector = detector; // assignment operator
ProcessQueueDetector(myQueueDetector);
}
Example in C
if(Detector_get_Type(hDetector) == DT_QUEUE) {
ProcessQueueDetector(hDetector);
}
3.13. SpeedDetector 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 44
Page 45
QuercusVL Programming Manual
SpeedDetector mySpeedDetector;
mySpeedDetector = detector; // assignment operator
ProcessSpeedDetector(mySpeedDetector);
}
Example in C
if(Detector_get_Type(hDetector) == DT_SPEED) {
ProcessSpeedDetector(hDetector);
}
3.13.1. Properties
CalculateMetrics
C++: bool get_CalculateMetrics()
C: int VL_SpeedDetector_get_CalculateMetrics (int h)
Returns true if the detector is enabled to calculate the metrics.
In C, the parameter “h” is a handler of detector (SpeedDetector).
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).
Length
C++: int get_Length()
C: int VL_SpeedDetector_get_Length(int h)
Returns the length of the detector; in millimetres.
In C, the parameter “h” is a handler of detector (SpeedDetector).
3.14. 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 45
Page 46
QuercusVL Programming Manual
Example in C++
if(detector.get_Type() == DT_RED_LIGHT) {
RedLightDetector myRedLightDetector;
myRedLightDetector = detector; // assignment operator
ProcessRedLightDetector(myRedLightDetector);
}
Example in C
if(Detector_get_Type(hDetector) == DT_RED_LIGHT) {
ProcessRedLightDetector(hDetector);
}
3.14.1. Properties
CalculateMetrics
C++: bool get_CalculateMetrics()
C: int VL_RedLightDetector_get_CalculateMetrics (int h)
Returns 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)
Returns the distance from the camera to the detector; in millimetres.
In C, the parameter “h” is a handler of detector (RedLightDetector).
Length
C++: int get_Length()
C: 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()
C: int VL_RedLightDetector_get_DelayTime(int h)
Quercus Technologies 46
Page 47
QuercusVL Programming Manual
Returns the minimum time (in milliseconds) that must go by, from the moment the
lights go red, until the infringement is made, to generate a valid incidence. User
configurable.
In C, the parameter “h” is a handler of detector (RedLightDetector).
TrafficLightId
C++: int get_TrafficLightId()
C: int VL_RedLightDetector_get_TrafficLightId(int h)
Returns the traffic light identifier used for the red state sign. If no traffic light has been
configured, but a digital input (see Input from RedLightDetector), it will return -1
In C, the parameter “h” is a handler of detector (RedLightDetector).
RedInput
C++: int get_RedInput()
C: int VL_RedLightDetector_get_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 C, the parameter “h” is a handler of detector (RedLightDetector).
AmberInput
C++: int get_AmberInput()
C: int VL_RedLightDetector_get_AmberInput(int h)
Returns the identifier of the digital input used for the amber light. If no input has been
configured, but a traffic light (see TrafficLightId from RedLightDetector), it will return
-1.
In C, the parameter “h” is a handler of detector (RedLightDetector).
IsVideoEnabled
C++: bool get_IsVideoEnabled()
C: 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 47
Page 48
QuercusVL Programming Manual
PreVideoTimeMs
C++: int get_PreVideoTimeMs ( )
C: int VL_RedLightDetector_get_PreVideoTimeMs( int h )
Returns the tiime that the start of the video capture in the incidences will be advanced;
in miliseconds.
In C, the parameter “h” is a handler of detector (RedLightDetector).
PostVideoTimeMs
C++: int get_PostVideoTimeMs ( )
C: int VL_RedLightDetector_get_PostVideoTimeMs( int h )
Returns the time that the stop of video capture in the incidences will be delayed; in
miliseconds.
In C, the parameter “h” is a handler of detector (RedLightDetector).
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 C, the parameter “h” is a handler of detector (RedLightDetector).
3.15. Class StoppedCarDetector
Logic representation of a detector of stopped car 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 stopped car
detector.
Example in C++
if(detector.get_Type() == DT_STOPPED_CAR) {
StoppedCarDetector myStpoppedCarDetector;
myStpoppedCarDetector = detector; // assignment operator
ProcessStoppedCarDetector (myStpoppedCarDetector);
}
Quercus Technologies 48
Page 49
QuercusVL Programming Manual
Example in C
if(Detector_get_Type(hDetector) == DT_STOPPED_CAR) {
ProcessStoppedCarDetector(hDetector);
}
3.15.1. Properties
MaxStopTime
C++: int get_MaxStopTime()
C: int VL_StoppedCarDetector_get_MaxStopTime(int h)
Returns the minimum time the vehicle must be stopped, once the traffic light turns red,
to generate a violation; in miliseconds.
In C, the parameter “h” is a handler of detector (StoppedCarDetector).
TrafficLightId
C++: int get_TrafficLightId()
C: int VL_StoppedCarDetector_get_TrafficLightId(int h)
Returns the traffic light identifier used as stop signal. 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_RedInput()
C: int VL_StoppedCarDetector_get_RedInput(int h)
Returns the digital input identifier used as stop signal. If no digital input is configured,
but a traffic light (see TrafficLightId from StoppedCarDetector), it will return -1.
In C, the parameter “h” is a handler of detector (StoppedCarDetector).
IsVideoEnabled
C++: bool get_IsVideoEnabled()
C: 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 49
Page 50
QuercusVL Programming Manual
PreVideoTimeMs
C++: int get_PreVideoTimeMs ( )
C: int VL_StoppedCarDetector_get_PreVideoTimeMs( int h )
Returns the tiime that the start of the video capture in the incidences will be advanced;
in miliseconds.
In C, the parameter “h” is a handler of detector (StoppedCarDetector).
PostVideoTimeMs
C++: int get_PostVideoTimeMs ( )
C: int VL_StoppedCarDetector_get_PostVideoTimeMs( int h )
Returns the time that the stop of video capture in the incidences will be delayed; in
miliseconds.
In C, the parameter “h” is a handler 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_Count(int h) of Unit
Number of traffic lights in the unit.
Item
C++: TrafficLight Item ( int item )
C: Does not exist, check VL_Unit_get_TrafficLights_Item(int h, int item) of
Unit
Returns the traffic light in the indicated position inside the traffic lights collection of the
unit. 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 50
Page 51
QuercusVL Programming Manual
TrafficLight class)
Id
C++: TrafficLight Id ( int id )
C: Does not existe, check VL_Unit_get_TrafficLights_Id(int h, int id) of Unit.
Returns the traffic light identified by “id” inside the traffic lights collection of the unit.
If there is no traffic light for the specified id, it will return an invalid one ( see IsValid
from TrafficLight class)
3.17. TrafficLight Class
Logical representation of a traffic light.
For historical reasons, all the coordinates described 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 traffic light belongs to.
In C, the parameter “h” is a handler of the traffic light (TrafficLight).
Id
C++: int get_Id()
C: int VL_TrafficLight_get_Id(int h)
Returns the traffic light identifier.
In C, the parameter “h” is a handler of the traffic light (TrafficLight).
NumLights
C++: int get_NumLights()
C: 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 51
Page 52
QuercusVL Programming Manual
Lights
C++: Lights get_Lights()
C: Does not exist
In C++ returns the collection of lights that make up the traffic light.
In C there is no representation of “Lights” collection, but methods to directly access to
collection properties:
int VL_TrafficLight_get_Lights_Count(int h): number of lights in the traffic light.
int VL_TrafficLight_get_Lights_Item(int h, int item): returns the light in the
specified position, inside the lights collection of the traffic light (starting from
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 object contains valid information about a traffic light, and false if
invalid. Some methods, may sometimes, return void traffic lights. In C, this behaviour
is detected as its value will be “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
C: void VL_TrafficLight_AddRef ( int h )
See 2.2.1. Memory management.
Release
C++: Does not exist
C: void VL_TrafficLight_Release ( int h )
See 2.2.1. Memory management.
Quercus Technologies 52
Page 53
QuercusVL Programming Manual
3.18. HistoricIncidences Class
Record of incidences of a unit.
3.18.1. Properties
Current
C++: Incidence get_Current()
C: int VL_HistoricIncidences_get_Current(int h)
Returns the selected incidence from the record. To change the selected incidence use
the methods MoveFirst, MoveNext, MovePrevious and MoveLast. The selected incidence
will always comply with the applied filter (see the method SetFilter of HistoricIncidences
class).
In C++, if there is no available incidence returns and invalid one (see IsValid from
Incidence class) .
In C, the parameter “h” is a handler 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 from Incidence class).
In C, if there is no available incidence, returns null.
3.18.2. Methods
MoveFirst
C++: void MoveFirst()
C: void VL_HistoricIncidences_MoveFirst(int h)
Assigns to Current property, the information of the record's first 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 (HistoricIncidences).
MoveNext
C++: bool MoveNext()
C: int VL_HistoricIncidences_MoveNext(int h)
Assigns to Current property, the information of the record's next incidence, that
Quercus Technologies 53
Page 54
QuercusVL Programming Manual
complies with the applied filter (see the method SetFilter from HistoricIncidences
class).
In C the parameter “h” is a handler of incidences record (HistoricIncidences).
MovePrevious
C++: bool MovePrevious()
C: int HistoricIncidences_MovePrevious(int h)
Assigns to Current property, the information of the record's previous 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 (HistoricIncidences).
MoveLast
C++: void MoveLast()
C: void VL_HistoricIncidences_MoveLast(int h)
Assigns to Current property, 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 (HistoricIncidences).
SetFilter
C++: void SetFilter(VLDetectorType detectorType,int detectorId)
C: void VL_HistoricIncidences_SetFilter(int h,int detectorType,int detectorId)
Sets a filter on the incidences record, in a way that only the incidences that comply with
the requirements will be selectable. The filter is defined with the variables:
detectorType: type of detector.
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 54
Page 55
QuercusVL Programming Manual
3.19.1. Properties
Current
C++: Summary get_Current()
C: int VL_HistoricSummaries_get_Current(int h)
Returns the selected summary from the record. To change the selected summary use
the methods MoveFirst, MoveNext, MovePrevious and MoveLast. The selected summary
will always comply with the applied filter (see the method SetFilter of
HistoricSummaries class).
In C++, if there is no available summary returns and invalid one (see IsValid from
Summary class) .
In C the parameter “h” is a handler of summary record (HistoricSummaries). Returns a
handler of the summary (Summary).
In C, when the object is no more 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_HistoricSummaries_MoveFirst(int h)
Assigns to Current property, the information of the record's first 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).
MoveNext
C++: bool MoveNext()
C: int VL_HistoricSummaries_MoveNext(int h)
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 55
Page 56
QuercusVL Programming Manual
C++: bool MovePrevious()
C: int VL_HistoricSummaries_MovePrevious(int h)
Assigns to Current property, the information of the record's previous 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).
MoveLast
C++: void MoveLast()
C: void VL_HistoricSummaries_MoveLast(int h)
Assigns to Current property, the information of the record's last 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).
SetFilter
C++: void SetFilter(VLDetectorType detectorType,int detectorId)
C: void VL_HistoricSummaries_SetFilter(int h,int detectorType,int
detectorId)
Sets a summary record filter, in a way that only the summaries that comply with the
requirements will be selectable. The filter is defined with the variables:
detectorType: type of detector.
DetectorId: identifier of detector.
Use value -1 for the fields that should not be filtered.
In C the parameter “h” is a handler of summary record (HistoricSummaries).
3.20. 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 56
Page 57
QuercusVL Programming Manual
C++: Unit get_Unit()
C: int VL_RealTimeInformation_get_Unit(int h)
Returns the unit identifier that generated the event.
In C, the parameter “h” is a handler of real time information (RealTimeInformation).
DetectorId
C++: int get_DetectorId()
C: int VL_RealTimeInformation_get_DetectorId(int h)
Returns the detector identifier where the event has been generated.
In C, the parameter “h” is a handler of real time information (RealTimeInformation).
DetectorType
C++: VL_DetectorType get_DetectorType()
C: int VL_RealTimeInformation_get_DetectorType(int h)
Returns the type of detector where the event has been generated.
In C, 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, there is no representation of “Timestamp” class, but methods to directly access to
class properties:
int VL_RealTimeInformation_get_Timestamp_Seconds(int h): date and time
when the real time info was generated, showing the number of seconds elapsed
since 00:00 hours on the first of 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_RealTimeInformation_get_Timestamp_USeconds(int h): microsecond
when the real time info was generated.
In C, the parameter “h” is a handler of real time information (RealTimeInformation).
WrongWay
Quercus Technologies 57
Page 58
QuercusVL Programming Manual
C++: bool get_WrongWay()
C: int VL_RealTimeInformation_get_WrongWay(int h)
Returns true if the direction of the detected vehicle is incorrect, and false if correct.
In C, the parameter “h” is a handler of real time information (RealTimeInformation).
Speed
C++: int get_Speed()
C: int VL_RealTimeInformation_get_Speed(int h)
Returns the speed of the detected vehicle; in Km/h. If speed calculation was not
possible the value will be -1.
In C, the parameter “h” is a handler of real time information (RealTimeInformation).
Length
C++: int 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 a handler of real time information (RealTimeInformation).
Occupation
C++: int get_Occupation()
C: int VL_RealTimeInformation_get_Occupation(int h)
Returns the occupation of a queue detector; percent rate.
In C, the parameter “h” is a handler of real time information (RealTimeInformation).
IsOccupied
C++: bool get_IsOccupied()
C: 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 58
Page 59
QuercusVL Programming Manual
3.20.2. Methods
IsValid
C++: bool IsValid()
C: Does not exist
Returns true if the object contains valid information about a real time event, and false if
invalid. Some methods, may sometimes, return void real time events. In C, this
behaviour is detected as its value will be “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
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. Memory management.
3.21. Regions Class
Collection of coordinates; which define each detector loop.
3.21.1. Properties
Count
C++: int Count ( )
C: 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 )
C: Does not exist, check VL_Detector_get_LoopsCoordinates_Item(int h, int
Quercus Technologies 59
Page 60
QuercusVL Programming Manual
item) of Unit.
Returns the coordinates (Region) in the indicated position inside the coordinates
collection. The location of a loop coordinates inside a collection corresponds with the
internal loop identifier, assigned and used only by the library.
In C++, the parameter “item” must specify the position (starting from zero).
If there is no Region for the indicated position, it will return an invalid 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 (horizontal axis) of vertex 1.
In C, the parameter “h” is a handler of the region (Region).
Y1
C++: int get_Y1()
C: int VL_Region_get_Y1(int h)
Returns the Y value (vertical axis) of vertex 1.
In C, the parameter “h” is a handler of the region (Region).
X2
C++: int get_X2()
C: 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).
Y2
C++: int get_Y2()
Quercus Technologies 60
Page 61
QuercusVL Programming Manual
C: int VL_Region_get_Y2(int h)
Returns the Y value (vertical axis) of vertex 2.
In C, the parameter “h” is a handler of the region (Region).
X3
C++: int get_X3()
C: int VL_Region_get_X3(int h)
Returns the X value (horizontal axis) of vertex 3.
In C, the parameter “h” is a handler of the region (Region).
Y3
C++: int 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 value (horizontal axis) of vertex 4.
In C, the parameter “h” is a handler of the region (Region).
Y4
C++: int get_Y4()
C: 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()
C: Does not exist
Quercus Technologies 61
Page 62
QuercusVL Programming Manual
Returns true if the object contains valid information about a coordinates, and false if
invalid. Some methods, may sometimes, return void coordinates. In C, this behaviour is
detected as its value will be “0”. In C++, however, this method is necessary because
the object, as it is not a pointer, would always be valid.
3.23. Lights Class
Collection of lights that form a traffic light.
3.23.1. Properties
Count
C++: int Count ( )
C: Does not exist, check VL_TrafficLight_get_Lights_Count(int h) of
TrafficLight.
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 inside the lights collection of a traffic light.
The location of a light inside the collection follows the configuration order.
In C++, the parameter “item” must specify the position (starting from zero).
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()
C: int VL_Light_get_Type(int h)
Returns the light type (VLLightType).
Quercus Technologies 62
Page 63
QuercusVL Programming Manual
In C, the parameter “h” is a handler of the light (Light).
X
C++: int get_X()
C: int VL_Light_get_X(int h)
Returns the X position (horizontal axe) of the light.
In C, the parameter “h” is a handler of the light (Light).
Y
C++: int get_Y()
C: int VL_Light_get_Y(int h)
Returns the Y position (vertical axe) of the light.
In C, the parameter “h” is a handler of the light (Light).
Radius
C++: int get_Radius()
C: int VL_Light_get_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 true if the object contains valid information about a light, and false is the
information is not valid. Some functions, may sometimes return, void units. In C, this
behaviour is detected as its value will be “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 63
Page 64
QuercusVL Programming Manual
C++: Unit get_Unit()
C: int VL_Incidence_get_Unit(int h)
Returns the unit that generated the incidence.
In C, the parameter “h” is a handler of the incidence (Incidence).
DetectorId
C++: int get_DetectorId()
C: int VL_Incidence_get_DetectorId(int h)
Returns the detector identifier that generated the incidence.
In C, the parameter “h” is a handler of the incidence (Incidence).
DetectorType
C++: VLDetectorType get_DetectorType()
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_Id(int h)
Returns the incidence identifier.
In C, the parameter “h” is a handler of the incidence (Incidence).
Type
C++: VLIncidenceType get_Type()
C: int VL_Incidence_get_Type(int h)
Returns the type of incidence.
In C, the parameter “h” is a handler of the incidence (Incidence).
Speed
C++: int get_Speed()
C: int VL_Incidence_get_Speed(int h)
Returns the recorded speed, in km/h. If speed calculation was not possible returns -1.
Quercus Technologies 64
Page 65
QuercusVL Programming Manual
In C, the parameter “h” is a handler of the incidence (Incidence).
DelayTime
C++: int get_DelayTime()
C: int VL_Incidence_get_DelayTime(int h)
Returns the minimum time (in milliseconds) that must go by, from the moment the
lights go red, until the infringement is made, to generate a valid incidence.
In C, the parameter “h” is a handler of the incidence (Incidence).
ElapsedTime
C++: int get_ElapsedTime()
C: int VL_Incidence_get_ElapsedTime(int h)
Returns the time elapsed since the traffic light went red; in milliseconds.
In C, the parameter “h” is a handler of the incidence (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 transcurrido con la señal de ámbar activa antes de la activación de
prohibición de paso que ha generado la incidencia; en milisegundos.
En C, el parámetro “h” es un manejador de la incidencia (Incidence).
MaxStopTime
C++: int get_MaxStopTime()
C: int VL_Incidence_get_MaxStopTime(int h)
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()
C: int VL_Incidence_get_TotalStoppedTime(int h)
Quercus Technologies 65
Page 66
QuercusVL Programming Manual
Returns the total amount of time that the vehicle was stopped, including the time
previous to the traffic light going red; in miliseconds.
En C, the parameter “h” is a handler of incidence (Incidence).
Images
C++: Images get_Images()
C: Does not exist
In C++ returns the collection of images that make up the incidence.
In C, there is no representation of “Images” , but methods to directly access to
collection properties:
int VL_Incidence_get_Images_Count(int h): number of images in the incidence.
int VL_Incidence_get_Images_Item(int h, int item): returns the image in the
indicated position inside the 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 Release method from Image).
In C, the parameter “h” is a handler of the incidence (Incidence).
Video
C++: Video get_Video()
C: int VL_Incidence_get_Video(int h)
Returns the generated video of the incidence.
In C++, if there is no video from the incidence, returns a invalid one (see IsValid from
Video class)
In C, if there is no video of the incidence returns null.
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()
C: Does not exist
Quercus Technologies 66
Page 67
QuercusVL Programming Manual
Returns true if the object contains valid information about an incidence, and false if
invalid. Some methods, may sometimes, return void incidences. In C, this behaviour is
detected as its value will be “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
C: void VL_Incidence_AddRef ( int h )
See 2.2.1. Memory management.
Release
C++: Does 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_get_Images_Count(int h) from
Incidence.
Amount of images in the collection.
Item
C++: Image Item(int item)
C: Does not exist, check VL_Incidence_get_Images_Item(int h, int item).
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 67
Page 68
QuercusVL Programming Manual
from Image class).
The images inside the collection, follow chronological order.
3.27. Image Class
Logical representation of an incidence image.
3.27.1. Properties
GetBuffer
C++: int GetBuffer(unsigned char* pBuffer, int maxSize)
C: int VL_Image_GetBuffer(int h, unsigned char* pBuffer, int maxSize)
Copies the JPEG image to the buffer pBuffer, and returns its maximum size in bytes.
The maximum image size is 5242880 bytes.
The parameter maxSize shows the size of buffer pBuffer. This is a security parameter; if
buffer size is not big enough, it 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 the picture.
In C, there is no representation of “Timestamp” class, but methods to directly access to
its properties:
int VL_Image_get_Timestamp_Seconds(int h): date and time when the picture
was taken, showing the number of seconds elapsed since 00:00 hours on the
first of 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()
C: Does not exist
Quercus Technologies 68
Page 69
QuercusVL Programming Manual
Returns true if the object contains valid information about an image, and false if invalid.
Some methods, may sometimes, return void images. In C, this behaviour is detected as
its value will be “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
C: void VL_Image_AddRef ( int h )
See 2.2.1. Memory management.
Release
C++: Does not exist
C: void VL_Image_Release ( int h )
See 2.2.1. Memory management.
3.28. 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)
provides the absolute path of the video file in the unit, at text string “pBuffer”, ending
with character \0. You need to set the buffer size at “maxSize”
Returns the number of characters in the string
In C, the parameter “h” is a handler of video (Video).
IniTimestamp
C++: Timestamp get_IniTimestamp()
C: 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 69
Page 70
QuercusVL Programming Manual
int VL_Video_get_IniTimestamp_Seconds(int h): date and time when the video
recording started, showing the number of seconds elapsed since 00:00 hours on
the first of 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.
The parameter “h” is a handler of video (Video).
int VL_Video_get_IniTimestamp_USeconds(int h): microsecond when the video
recording started.
The parameter “h” is a handler of video (Video).
EndTimestamp
C++: Timestamp get_EndTimestamp()
C: Does not exist
In C++, returns the time stamp where the unit stopped the video 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, showing the number of seconds elapsed since 00:00 hours on
the first of 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.
The parameter “h” is a handler of video (Video).
int VL_Video_get_EndTimestamp_USeconds(int h): microsecond when the video
recording stopped.
The parameter “h” is a handler of video (Video).
Duration
C++: int get_Duration()
C: 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()
C: int VL_Video_get_Framerate( int h )
Quercus Technologies 70
Page 71
QuercusVL Programming Manual
Returns the number to frames per second of the video.
In C, the parameter “h” is a handler of video (Video).
Width
C++: int get_Width()
C: int VL_Video_get_Width ( int h )
Returns the width of the video ; in pixels.
In C, the parameter “h” is a handler of video (Video).
Height
C++: int get_Height()
C: int VL_Video_get_Height ( int h )
Returns the heigth of the video ; in pixels.
In C, the 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, may sometimes, return void videos. In C, this behaviour is detected as
its value will be “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
C: void VL_Video_AddRef ( int h )
See 2.2.1. Memory management.
Release
C++: Does not exist
C: void VL_Video_Release ( int h )
See 2.2.1. Memory management.
Quercus Technologies 71
Page 72
QuercusVL Programming Manual
3.29. Summary Class
Logic representation of a summary.
3.29.1. Properties
Unit
C++: Unit get_UnitId()
C: int VL_Summary_get_Unit(int h)
Returns the unit that generated the summary.
In C, the parameter “h” is a handler of summary (Summary).
DetectorId
C++: int get_DetectorId()
C: int VL_Summary_get_DetectorId(int h)
Returns the detector identifier that generated 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 summary.
In C, the parameter “h” is a handler of summary (Summary).
Begin
C++: int get_Begin()
C: int VL_Summary_get_Begin(int h)
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).
End
C++: int get_End()
C: int VL_Summary_get_End(int h)
Quercus Technologies 72
Page 73
QuercusVL Programming Manual
Returns the time stamp when summary data collection finished; 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).
Volume
C++: int get_Volume()
C: int VL_Summary_get_Volume(int h)
Returns the number of vehicles of the summary.
In C, the parameter “h” is a handler of summary (Summary).
AvgSpeed
C++: int get_AvgSpeed()
C: int VL_Summary_get_AvgSpeed(int h)
Returns the average speed 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 h)
Returns the average length of vehicles in the summary; in millimetres. If length
calculation was not possible returns -1.
In C, the parameter “h” is a handler of summary (Summary).
AvgHeadway
C++: int get_AvgHeadway()
C: 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 73
Page 74
QuercusVL Programming Manual
C: Does not exist
In C++, returns the collection of values making up distribution of speeds in the
summary.
In C, there is no representation of “SpeedsDistribution” collection, but methods to
directly access to collection properties:
int VL_Summary_get_SpeedsDistribution_Count(int h): number of values
making up distribution of speeds in the summary.
int VL_Summary_get_SpeedsDistribution_Item(int h, int item): returns the
value in the indicated position, inside the collection of values making up
distribution of speeds in the summary (starting from zero).
If there is no SpeedsDistribution at the specified position, it returns null.
The parameter “h” is a handler of summary (Summary).
LengthsDistribution
C++: LengthsDistribution get_LengthsDistribution()
C: Does 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 collection properties:
int VL_Summary_get_LengthsDistribution_Count(int h): number of values
making up distribution of lengths in the summary.
int VL_Summary_get_LengthsDistribution_Item(int h, int item): returns the
value in the indicated position, inside the collection of values making up
distribution of lengths in the summary (starting from zero).
If there is no LengthsDistribution at the specified position, it returns null.
The parameter “h” is a handler of summary (Summary).
OccupationsDistribution
C++: OccupationsDistribution get_OccupationsDistribution()
C: 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 74
Page 75
QuercusVL Programming Manual
directly access to collection properties:
int VL_Summary_get_OccupationsDistribution_Count(int h): number of values
making up distribution of occupancies in the summary.
int VL_Summary_get_OccupationsDistribution_Item(int h, int item): returns the
value in the indicated position, inside the collection of values making up
distribution of occupancies in the summary (starting from zero).
If there is no OccupationsDistribution at the specified position, it returns null.
The parameter “h” is a handler of summary (Summary).
SpeedsUpperLimit
C++: SpeedsUpperLimit get_SpeedsUpperLimit()
C: Does not exist
In C++, it returns the collection of values making up the ranges of distribution of
speeds in the summary.
In C, there is no representation of “SpeedsUpperLimit” collection, but methods to
directly access to collection properties:
int VL_Summary_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 indicated position, inside the collection of values making up the ranges of
distribution of speeds in the summary (starting from zero).
If there is no SpeedsUpperLimit at the specified position, it returns null.
The parameter “h” is a handler of summary (Summary).
LengthsUpperLimit
C++: LengthsUpperLimit get_LengthsUpperLimit()
C: Does not exist
In C++, returns the collection of values making up the ranges of distribution of lengths
in the summary.
In C, there is no representation of “LengthsUpperLimit” collection, but methods to
directly access to collection properties:
int VL_Summary_get_LengthsUpperLimit_Count(int h): number of 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 75
Page 76
QuercusVL Programming Manual
ranges of distribution of lengths in the summary (starting from zero).
If there is no LengthsUpperLimit at the specified position, it returns null.
The parameter “h” is a handler of summary (Summary).
OccupationsUpperLimit
C++: OccupationsUpperLimit get_OccupationsUpperLimit()
C: Does not exist
In C++, it returns the collection of values making up the ranges of distribution of
occupancies in the summary.
In C, there is no representation of “OccupationsUpperLimit” collection, but methods to
directly access to collection properties :
int VL_Summary_get_OccupationsUpperLimit_Count(int h): number of values
making up the ranges of distribution of occupancies 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 occupancies in the summary (starting from zero).
If there is no OcupationsUpperLimit at the specified position, it returns null.
The parameter “h” is a handler of summary (Summary).
3.29.2. Methods
IsValid
C++: bool IsValid()
C: Does not exist
Returns true if the object contains valid information about a summary, and false if
invalid. Some methods, may sometimes, return void summaries. In C, this behaviour is
detected as its value will be “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
C: void VL_Summary_AddRef ( int h )
See 2.2.1. Memory management.
Release
C++: Does not exist
Quercus Technologies 76
Page 77
QuercusVL Programming Manual
C: void VL_Summary_Release ( int h )
See 2.2.1. Memory management.
3.30. SpeedsDistribution Class
Collection of percentages of vehicles that have circulated through a detector for a given speed
range. These ranges are defined in the collection SpeedsUpperLimit. For deeper information
about speed distribution, see SmartLoop® user manual.
3.30.1. Properties
Count
C++: int Count ( )
C: Does not exist, check VL_Summary_get_SpeedsDistribution_Count(int h)
from Summary
Number of values in the collection.
Item
C++: int Item ( int item )
C: Does not exist, check VL_Summary_get_SpeedsDistribution_Item(int h,
int 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
each value in the collection, corresponds with the order of ranges in the collection
SpeedsUpperLimit of the detector.
The parameter “item” must specify the position (starting from zero).
If there is no SpeedsDistribution at the specified position, it returns an invalid one (see
IsValid from 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 77
Page 78
QuercusVL Programming Manual
3.31.1. Properties
Count
C++: int Count ( )
C: Does not exist, check VL_Summary_get_LengthsDistribution_Count(int h)
from Summary
Number of values in the collection.
Item
C++: int Item ( int item )
C: Does not exist, check VL_Summary_get_LengthsDistribution_Item(int h,
int 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 length range. The location
of each value in the collection, corresponds with the order 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 invalid one (see
IsValid from LengthsDistribution class).
3.32. OccupationsDistribution Class
Collection of time percentages that a detector has been occupied for a given occupancy range.
These ranges are defined in the collection OccupationsUpperLimit. For deeper information
about occupation distribution, see SmartLoop® user manual.
3.32.1. Properties
Count
C++: int Count ( )
C: Does not 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 78
Page 79
QuercusVL Programming Manual
C: Does not exist, check
VL_Summary_get_OccupationsDistribution_Item(int h, int item) de Summary
Returns the percentage in the indicated position within the collection of time
percentages for a given occupancy range. The location of each time percentage in the
collection, corresponds with the order of ranges in the collection
OccupationsUpperLimit of the detector.
The parameter “item” must specify the position (starting from zero).
If there is no OccupationsDistribution at the specified position, it returns an invalid one
(see IsValid from OccupationsDistribution class).
3.33. SpeedsUpperLimit Class
Collection 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_SpeedsUpperLimit_Count(int h)
de Summary
Number of values in the collection.
Item
C++: int Item ( int item )
C: Does not exist, check VL_Summary_get_SpeedsUpperLimit_Item(int h,
int item) from Summary
Returns the value in the indicated position, inside the collection of values making up the
speed 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 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 79
Page 80
QuercusVL Programming Manual
3.34. LengthsUpperLimit Class
Collection of values making up the length ranges of a detector. For deeper information about
length distribution, see SmartLoop® user manual.
3.34.1. Properties
Count
C++: int Count ( )
C: Does not exist, check VL_Summary_get_LengthsUpperLimit_Count(int h)
from Summary
Number of values in the collection.
Item
C++: int Item ( int item )
C: Does not exist, check VL_Summary_get_LengthsUpperLimit_Item(int h,
int item) from Summary
Returns the value in the indicated position, inside the collection 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 the position (starting from zero).
If there is no LengthsUpperLimit at the specified position, it returns an invalid one (see
IsValid from LengthsUpperLimit class).
3.35. OccupationsUpperLimit 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 ( )
C: Does not exist, check
VL_Summary_get_OccupationsUpperLimit_Count(int h) from Summary
Number of values the collection.
Quercus Technologies 80
Page 81
QuercusVL Programming Manual
Item
C++: int Item ( int item )
C: Does not exist, check VL_Summary_get_OccupationsUpperLimit_Item(int
h, int item) from Summary
Returns the value in the indicated position, inside the collection of values making up the
occupancy percentage 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 the position (starting from zero).
If there is no OccupationsUpperLimit at the specified position, it returns an 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 h), where class
is the class referenced by Timestamp.
Date and time of the timestamp, showing the seconds elapsed since 00:00 hours on the
first of 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.
USeconds
C++: int get_USeconds()
C: 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 81
Page 82
QuercusVL Programming Manual
3.37.1. Properties
Code
C++: VLNotificationCode get_Code()
C: int VL_Notification_get_Code(int h)
Returns the notification code.
In C, the parameter “h” is a handler of the notification (Notification).
Unit
C++: Unit get_Unit()
C: int VL_Notification_get_Unit(int h)
Returns the unit that generated the notification.
In C, the parameter “h” is a handler of the notification (Notification).
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 configuration system,
false otherwise.
Login
C++: bool Login ( const char* password )
C: int 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 82
Page 83
QuercusVL Programming Manual
C: int VL_Configuration_Logout ( int h )
Exits unit's configuration system. Returns true for a successful operation, otherwise
returns false.
In C the parameter “h” is a handler of Configuration.
IsLoggedIn
C++: bool IsLoggedIn()
C: int VL_Configuration_IsLoggedIn ( int h )
Checks if currently there is access to unit's configuration system. Returns true for a
successful operation, otherwise returns false.
In C the parameter “h” is a handler of Configuration.
ChangePassword
C++: bool ChangePassword ( const char* newPassword )
C: int VL_Configuration_ChangePassword ( int h, const char* newPassword )
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.
In C the parameter “h” is a handler of Configuration.
SyncTime
C++: bool SyncTime ( )
C: int VL_Configuration_SyncTime ( int h )
Synchronizes date and time using protocol and server specified in configuration.
Returns true for a successful operation, otherwise returns false.
In C the parameter “h” is a handler of Configuration.
SetTime
C++: bool SetTime ( long dateTime )
C: int 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 1st of 1970 at 00:00 h. Returns true for a successful
Quercus Technologies 83
Page 84
QuercusVL Programming Manual
operation, otherwise returns false.
In C the parameter “h” is a handler of Configuration.
UpdateFirmware
C++: bool UpdateFirmware ( const char* fileName )
C: int VL_Configuration_UpdateFirmware ( int h, const char* fileName )
Updates unit's firmware using firmware file indicated in “fileName” . The file must have
been previously uploaded to the root of unit's ftp server. Returns true for a successful
operation, otherwise returns false.
In C the parameter “h” is a handler of Configuration.
RestoreFirmware
C++: bool RestoreFirmware ( )
C: int VL_Configuration_RestoreFirmware ( int h )
Restore unit's original firmware. 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_Configuration_ExportLog ( int h, int logType, const char* fileName )
Exports log file type specified in “logType” (see 3.60. VLLogSystem Type) and saves it
at the root of unit's ftp server named as “fileName”. Returns true for a successful
operation, otherwise returns false.
In C the parameter “h” is a handler of Configuration.
GetSystemInformation
C++: SystemInformation GetSystemInformation()
C: 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 84
Page 85
QuercusVL Programming Manual
ExportStatus
C++: bool ExportStatus ( const char* fileName )
C: int VL_Configuration_ExportStatus ( int h, const char* fileName )
Creates a system status report an saves it at the root of unit's ftp server named as
“fileName”. Returns true for a successful operation, otherwise returns false.
In C the parameter “h” is a handler of Configuration.
GetEntriesCount
C++: int GetEntriesCount()
C: int VL_Configuration_GetEntriesCount ( int h )
Returns the number of variables of unit's configuration system or -1 when failed.
In C the parameter “h” is a handler of Configuration.
GetEntry
C++: SettingsEntry GetEntry ( int n )
C: int VL_Configuration_GetEntryByIndex ( int h, int n )
Returns 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_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
SettingsEntry.
GetEntry
C++: SettingsEntry GetEntry ( const char* name )
C: int VL_Configuration_GetEntryByName ( int h, const char* name )
Returns the variable named “name” 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_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 85
Page 86
QuercusVL Programming Manual
SettingsEntry.
SetEntry
C++: bool SetEntry ( const char* name, const char* value )
C: int VL_Configuration_SetEntry ( int h, const char* name, const char* value )
Sets variable “name” value to “value”. Returns true for a successful operation,
otherwise returns false.
In C the parameter “h” is a handler of Configuration.
RestoreEntry
C++: bool RestoreEntry ( const char* name )
C: int VL_Configuration_RestoreEntry ( int h, const char* name )
Restores default value of variable “name”. Returns true for a successful operation,
otherwise returns false.
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 unit. Returns true
for a successful operation, otherwise returns false.
In C the parameter “h” is a handler of Configuration.
DiscardChanges
C++: bool DiscardChanges()
C: int VL_Configuration_DiscardChanges ( int h )
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 )
C: int VL_Configuration_ImportConfiguration ( int h, const char* fileName )
Quercus Technologies 86
Page 87
QuercusVL Programming Manual
Imports configuration file specified in “fileName”. The file must have been previously
uploaded to the root of unit's ftp server. Returns true for a successful operation,
otherwise returns false.
In C the parameter “h” is a handler of Configuration.
ExportConfiguration
C++: bool ExportConfiguration ( const char* fileName )
C: int VL_Configuration_ExportConfiguration ( int h, const char* fileName )
Exports configuration to file specified in “fileName” and saves it at the root of unit's ftp
server. Returns true for a successful operation, otherwise returns false.
In C the parameter “h” is a handler of Configuration.
NewPresenceDetector
C++: ConfigurationPresenceDetector NewPresenceDetector()
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
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.
NewQueueDetector
C++: ConfigurationQueueDetector NewQueueDetector()
C: int VL_Configuration_New_QueueDetector( int h )
Creates a new queue detector (default values).
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()
C: int VL_Configuration_New_SpeedDetector( int h )
Quercus Technologies 87
Page 88
QuercusVL Programming Manual
Creates a new speed detector (default values).
To add a new speed 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.
NewRedLightDetector
C++: ConfigurationRedLightDetector NewRedLightDetector()
C: int VL_Configuration_New_RedLightDetector( int h )
Creates a new red light detector (default values).
To add a new red light 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.
NewStoppedCarDetector
C++: ConfigurationStoppedCarDetector NewStoppedCarDetector()
C: int VL_Configuration_New_StoppedCarDetector( int h )
Creates a new stopped car detector (default values).
To add a new stopped car detector to the unit this function must be used, to later
modify the detector and add it to the system using ApplyDetector function at
Configuration class.
In C the parameter “h” is a handler of Configuration.
GetDetectorCount
C++: int GetDetectorCount()
C: int 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 )
C: int VL_Configuration_Get_Detector( int h, int index, int id )
Quercus Technologies 88
Page 89
QuercusVL Programming Manual
Returns a detector from the 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 used; in the parameter not used, -1 must be indicated.
In C++, if there is no ConfigurationDetector 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_ConfigurationDetector_Release must be called (see Release method from
ConfigurationDetector class)
In C the parameter “h” is a handler of Configuration.
DeleteDetector
C++: bool DeleteDetector( int index, int id )
C: int VL_Configuration_Delete_Detector( int h, int index, int id )
Deletes a detector from the 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 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.
ApplyDetector
C++: bool ApplyDetector( ConfigurationDetector detector, VLConfigurationActionType
action, int previousId )
C: int VL_Configuration_Apply_Detector( int h, int hDetector, int action, int
previousId )
Joins a new detector into the unit's detector list, or modifies an existing one. The action
done will depend on the parameter “action” (see 3.61. VLConfigurationActionType Type
type).
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 89
Page 90
QuercusVL Programming Manual
Returns true if action was successful, false otherwise.
In C the parameter “h” is a handler of Configuration and hDetector a handler of
ConfigurationDetector.
NewTrafficLight
C++: ConfigurationTrafficLight NewTrafficLight()
C: int VL_Configuration_New_TrafficLight( int h )
Creates an empty traffic light. (default values).
To add a new traffic light to the unit, this function must be used, to later on modify the
traffic light and add it to the system with the function ApplyTrafficLight of Configuration
class.
In C the parameter “h” is a handler of Configuration.
GetTrafficLightsCount
C++: int GetTrafficLightsCount()
C: int VL_Configuration_Get_TrafficLightsCount ( int h )
Returns 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_TrafficLight( int h, int index, int id )
Returns a traffic light from the unit's traffic light list, which is specified by one of the
following two parameters:
Index: position of the traffic light the list of traffic lights of the unit.
Id: traffic light's identifier.
Only one of them can be used; in the parameter not used, -1 must be indicated.
In C++, if there is no ConfigurationTrafficLight 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_ConfigurationTrafficLight_Release must be called (see Release method from
ConfigurationTrafficLight class)
In C the parameter “h” is a handler of Configuration.
Quercus Technologies 90
Page 91
QuercusVL Programming Manual
DeleteTrafficLight
C++: bool DeleteTrafficLight( int index, int id )
C: int VL_Configuration_Delete_TrafficLight( int h, int index, int id )
Deletes a traffic light from the unit's traffic light list, which is specified by one of the
following two parameters:
Index: position of the traffic light the list of traffic lights of the unit.
Id: traffic light'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.
ApplyTrafficLight
C++: bool ApplyTrafficLight( ConfigurationTrafficLight trafficLight,
VLConfigurationActionType action, int previousId )
C: int VL_Configuration_Apply_TrafficLight( int h, int hTrafficLight, int action, int
previousID )
Joins a new 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 light 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 traffic light
which is going to be joined, then use value -1.
Returns true if action was successful, false otherwise.
In C the parameter “h” is a handler of Configuration and hTrafficLight a handler of
ConfigurationTrafficLight.
NewOutputActuator
C++: ConfigurationOutputActuator NewOutputActuator()
C: int VL_Configuration_New_OutputActuator( int h )
Creates an empty output actuator. (default values).
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 91
Page 92
QuercusVL Programming Manual
GetOutputActuatorsCount
C++: int GetOutputActuatorsCount()
C: int VL_Configuration_Get_OutputActuatorsCount ( int h )
Returns the number of configured output actuators.
In C the parameter “h” is a handler of Configuration.
GetOutputActuator
C++: ConfigurationOutputActuator GetOutputActuator( int index, int id )
C: int VL_Configuration_Get_OutputActuator( int h, int index, int id )
Returns an output actuator from the unit's output actuator list, which is specified by
one of the following two parameters:
Index: position of the output actuator the list of output actuators of the unit.
Id: output actuator's identifier.
Only one of them can be used; in the parameter not used, -1 must be indicated.
In C++, if there is no 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 be called (see Release method from
ConfigurationOutputActuator class)
In C the parameter “h” is a handler of Configuration.
DeleteOutputActuator
C++: bool DeleteOutputActuator( int index, int id )
C: int VL_Configuration_Delete_OutputActuator( int h, int index, int id )
Deletes an output actuator from the unit's output actuator list, which is specified by one
of the following two parameters:
Index: position of the output actuator the list of output actuators of the unit.
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 92
Page 93
QuercusVL Programming Manual
C++: bool ApplyOutputActuator( ConfigurationOutputActuator outputActuator,
VLConfigurationActionType action, int previousId )
C: int VL_Configuration_Apply_OutputActuator( int h, int hOutputActuator, int
action, int previousID )
Joins a new output actuator into the unit's output actuator list, or modifies an existing
one. The action done will depend on the parameter “action” (see 3.61.
VLConfigurationActionType Type type).
If an existing output actuator 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
output actuator which is going to be joined, then use value -1.
Returns true if action was successful, false otherwise.
In C the parameter “h” is a handler of Configuration and hOutputActuator 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 configuration system, indicated as a 2-character code ( ISO
639-1) ending with the character \0.
Returns true if it it has been possible to carry out the operation and false if not.
The parameters C
In C the parameter “h” is a Configuration handle.
GetLanguage
C++: bool GetLanguage( char *buf, int bufLen)
C: int Configuration_GetLanguage ( int h, char* buf, int bufLen )
Gets the language currently configured on the configuration system, indicated as a 2-
character code (ISO 639-1) ending with the character \0. The parameter “buf” is a
pointer to a buffer where the code will be written. 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 93
Page 94
QuercusVL Programming Manual
3.39. ConfigurationDetector Class
Represents a generic detector of the configuration system. Each other detector type, comes
from this class.
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.39.1. Properties
Id
Detector identifier. This must be unique in the unit's detector list.
C++: int get_Id ( )
C: int VL_ConfigurationDetector_get_Id ( int h )
Returns the identifier.
In C, the parameter “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 “h” is a handler of ConfigurationDetector.
Type
C++: VLDetectorType get_Type ( )
C: int VL_ConfigurationDetector_get_Type ( int h )
Returns the detector type. See 3.56. VLLightType Type.
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 ( )
C: int VL_ConfigurationDetector_get_AreIncidencesEnabled( int h )
Quercus Technologies 94
Page 95
QuercusVL Programming Manual
Returns the status of incidence generation.
In C, the parameter “h” is a handler of ConfigurationDetector.
C++: void put_AreIncidencesEnabled ( bool value )
C: void VL_ConfigurationDetector_put_AreIncidencesEnabled ( int h, int n )
True to enable the generation of incidences in the detector; false otherwise.
In C, the parameter “h” is a handler of ConfigurationDetector.
AreSummariesEnabled
Shows if the detector has the generation of summaries enabled. If disabled, no
summary will be generated in the detector.
C++: bool get_AreSummariesEnabled ( )
C: int VL_ConfigurationDetector_get_AreSummariesEnabled( 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_AreSummariesEnabled ( int h, int n )
True to enable the generation of summaries in the detector; false otherwise.
In C, the parameter “h” is a handler of ConfigurationDetector.
SendRealTimeInformation
Shows if real time information sending is enabled. If disabled, the unit will not inform
the central system about events of this detector.
C++: bool get_SendRealTimeInformation ( )
C: 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 95
Page 96
QuercusVL Programming Manual
C: void VL_ConfigurationDetector_put_SendRealTimeInformation ( int h, int n )
True to enable real time information sending; false otherwise.
In C, the parameter “h” is a handler of ConfigurationDetector.
SendIncidences
Shows if sending generated incidences is enabled. If disabled, the unit will not send any
generated incidence in the detector.
C++: bool get_SendIncidences ( )
C: int VL_ConfigurationDetector_get_SendIncidences( int h )
Returns the status of sending generated incidences.
In C, the parameter “h” is a handler of ConfigurationDetector.
C++: void put_SendIncidences ( bool value )
C: void 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.
SendSummaries
Sows if sending generated summaries is enabled. If disabled, the unit will not send to
the central system the generated summaries in the detector.
C++: bool get_SendSummaries ( )
C: int VL_ConfigurationDetector_get_SendSummaries( int h )
Returns the status of sending generated summaries.
In C, the parameter “h” is a handler of ConfigurationDetector.
C++: void put_SendSummaries ( bool value )
C: 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 96
Page 97
QuercusVL Programming Manual
SummariesPeriod
Time period for the summaries; in minutes.
C++: int get_SummariesPeriod ( )
C: int VL_ConfigurationDetector_get_SummariesPeriod( int h )
Returns the configured time period for the summaries.
In C, the parameter “h” is a handler of ConfigurationDetector.
C++: void put_SummariesPeriod ( int value )
C: void VL_ConfigurationDetector_put_SummariesPeriod ( int h, int n )
Modifies the time time period for the summaries.
In C, the parameter “h” is a handler of ConfigurationDetector.
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 ConfigurationDetector.
C++: void put_Coordinates ( int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4 )
C: void ConfigurationDetector_put_Coordinates ( int h, int x1, int y1, int x2, int y2,
int x3, int y3, int x4, int y4 )
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()
C: Does not exist.
Quercus Technologies 97
Page 98
QuercusVL Programming Manual
Returns true if the object contains valid information, false otherwise.
AddRef
C++: Does not exist
C: void VL_ConfigurationDetector_AddRef ( int h )
See 2.2.1. Memory management.
Release
C++: Does not exist
C: void VL_ConfigurationDetector_Release ( int h )
See 2.2.1. Memory management.
3.40. ConfigurationPresenceDetector Class
Represents a presence detector of the configuration system. This class derives from
ConfigurationDetector; see 3.39. ConfigurationDetector Class.
3.41. ConfigurationQueueDetector class
Represents a queue detector of the configuration system. This class derives from
ConfigurationDetector; see 3.39. ConfigurationDetector Class.
3.42. ConfigurationSpeedDetector class
Represents a speed detector of the configuration system. This class derives from
ConfigurationDetector; see 3.39. ConfigurationDetector 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 ( )
C: int VL_ConfigurationSpeedDetector_get_CalculateMetrics ( int h )
Quercus Technologies 98
Page 99
QuercusVL Programming Manual
Returns the status of speed and length calculation.
In C, the parameter “h” is a handler of ConfigurationDetector.
C++: void put_CalculateMetrics ( bool value )
C: void VL_ConfigurationSpeedDetector_put_CalculateMetrics ( int h, int n )
True to enable speed and length calculation; false otherwise.
In C, the parameter “h” is a handler of ConfigurationDetector.
Distance
Distance from the unit to the detector; in milimeters.
C++: int get_Distance ( )
C: int VL_ConfigurationSpeedDetector_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_ConfigurationSpeedDetector_put_Distance ( int h, int n )
Modifies the distance from the unit to the detector.
In C, the parameter “h” is a handler of ConfigurationDetector.
Length
Detector's length; in milimeters.
C++: int get_Length ( )
C: int 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 )
C: void VL_ConfigurationSpeedDetector_put_Length ( int h, int n )
Modifies the detector's length.
Quercus Technologies 99
Page 100
QuercusVL Programming Manual
In C, the parameter “h” is a handler of ConfigurationDetector.
3.43. ConfigurationRedLightDetector class
Represents a red light detector of the configuration system. This class derives from
ConfigurationDetector; see 3.39. ConfigurationDetector Class.
3.43.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 ( )
C: int VL_ConfigurationRedLightDetector_get_CalculateMetrics( int h )
Returns the status 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, int n )
True to enable speed and length calculation; false otherwise.
In C, the parameter “h” is a handler of ConfigurationDetector.
Distance
Distance from the unit to the detector; in milimeters.
C++: int get_Distance ( )
C: int VL_ConfigurationRedLightDetector_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 ( int value )
C: void VL_ConfigurationRedLightDetector_put_Distance ( int h, int n )
Modifies the distance from the unit to the detector.
Quercus Technologies
100
Loading...