Skip to content

Commit e347576

Browse files
signature of getParams(...) method changed
1 parent 96def93 commit e347576

7 files changed

Lines changed: 17 additions & 14 deletions

File tree

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# **VTracker interface C++ library**
66

7-
**v1.2.0**
7+
**v1.3.0**
88

99

1010

@@ -56,6 +56,7 @@
5656
| 1.0.0 | 20.07.2023 | First version. |
5757
| 1.1.0 | 10.08.2023 | - Data structures updated. |
5858
| 1.2.0 | 24.09.2023 | - Updated encode(...) and decode(...) methods of VTrackerParams.<br />- Added decodeAndExecuteCommand(...) method.<br />- Added example of video tracker implementation. |
59+
| 1.3.0 | 26.09.2023 | - Signature of getParams(...) method changed. |
5960

6061

6162

@@ -144,7 +145,7 @@ public:
144145
virtual float getParam(VTrackerParam id) = 0;
145146

146147
/// Get video tracker params (results).
147-
virtual VTrackerParams getParams() = 0;
148+
virtual void getParams(VTrackerParams& params) = 0;
148149

149150
/// Execute command.
150151
virtual bool executeCommand(VTrackerCommand id,
@@ -259,10 +260,12 @@ virtual float getParam(VTrackerParam id) = 0;
259260
**getParams(...)** method returns video tracker params class and tracking results. The particular implementation of the video tracker must provide thread-safe **getParams(...)** method call. This means that the **getParams(...)** method can be safely called from any thread. Method declaration:
260261
261262
```cpp
262-
virtual VTrackerParams getParams() = 0;
263+
virtual void getParams(VTrackerParams& params) = 0;
263264
```
264265

265-
**Returns:** video tracker parameters class (see [**VTrackerParams class**](#VTrackerParams-class-description) description).
266+
| Parameter | Description |
267+
| --------- | ------------------------------------------------------- |
268+
| params | Video tracker parameters class object (VTrackerParams). |
266269

267270

268271

@@ -337,7 +340,7 @@ static void encodeSetParamCommand(uint8_t* data, int& size, VTrackerParam id, fl
337340
| ---- | ----- | -------------------------------------------------- |
338341
| 0 | 0x01 | SET_PARAM command header value. |
339342
| 1 | 0x01 | Major version of VTracker class. |
340-
| 2 | 0x02 | Minor version of VTracker class. |
343+
| 2 | 0x03 | Minor version of VTracker class. |
341344
| 3 | id | Parameter ID **int32_t** in Little-endian format. |
342345
| 4 | id | Parameter ID **int32_t** in Little-endian format. |
343346
| 5 | id | Parameter ID **int32_t** in Little-endian format. |
@@ -380,7 +383,7 @@ static void encodeCommand(uint8_t* data, int& size, VTrackerCommand id, float ar
380383
| ---- | ----- | ------------------------------------------------------------ |
381384
| 0 | 0x00 | COMMAND header value. |
382385
| 1 | 0x01 | Major version of VTracker class. |
383-
| 2 | 0x02 | Minor version of VTracker class. |
386+
| 2 | 0x03 | Minor version of VTracker class. |
384387
| 3 | id | Command ID **int32_t** in Little-endian format. |
385388
| 4 | id | Command ID **int32_t** in Little-endian format. |
386389
| 5 | id | Command ID **int32_t** in Little-endian format. |
@@ -1154,7 +1157,7 @@ public:
11541157
float getParam(VTrackerParam id);
11551158

11561159
/// Get video tracker params (results).
1157-
VTrackerParams getParams();
1160+
void getParams(VTrackerParams& params);
11581161

11591162
/// Execute command.
11601163
bool executeCommand(VTrackerCommand id,

example/CustomVTracker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ float cr::vtracker::CustomVTracker::getParam(cr::vtracker::VTrackerParam id)
202202

203203

204204

205-
cr::vtracker::VTrackerParams cr::vtracker::CustomVTracker::getParams()
205+
void cr::vtracker::CustomVTracker::getParams(VTrackerParams& params)
206206
{
207-
return m_params;
207+
params = m_params;
208208
}
209209

210210

example/CustomVTracker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class CustomVTracker: public VTracker
3131
float getParam(VTrackerParam id);
3232

3333
/// Get video tracker params (results).
34-
VTrackerParams getParams();
34+
void getParams(VTrackerParams& params);
3535

3636
/// Execute command.
3737
bool executeCommand(VTrackerCommand id,

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.13)
66
## LIBRARY-PROJECT
77
## name and version
88
###############################################################################
9-
project(VTracker VERSION 1.2.0 LANGUAGES CXX)
9+
project(VTracker VERSION 1.3.0 LANGUAGES CXX)
1010

1111

1212

src/VTracker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ class VTracker
363363
* @brief Get video tracker params (results).
364364
* @return Video tracker params structure.
365365
*/
366-
virtual VTrackerParams getParams() = 0;
366+
virtual void getParams(VTrackerParams& params) = 0;
367367

368368
/**
369369
* @brief Execute command.

src/VTrackerVersion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

33
#define VTRACKER_MAJOR_VERSION 1
4-
#define VTRACKER_MINOR_VERSION 2
4+
#define VTRACKER_MINOR_VERSION 3
55
#define VTRACKER_PATCH_VERSION 0
66

7-
#define VTRACKER_VERSION "1.2.0"
7+
#define VTRACKER_VERSION "1.3.0"

0 commit comments

Comments
 (0)