Cogs.Core
EchoSounderExtension.h
1#pragma once
2
3#include "Base.h"
4
5#include "Foundation/Reflection/TypeDatabase.h"
6
7#include <stdint.h>
8
9#if defined( _WIN32 )
10 #define COGSECHO_API extern "C" __declspec(dllexport)
11#else
12 #define COGSECHO_API extern "C"
13#endif
14
15typedef Cogs::Reflection::FieldId FieldId;
16
17namespace Cogs
18{
19 namespace Core
20 {
21 class Context;
22
23 namespace EchoSounder
24 {
25
26 typedef int(*SetConfigPtr)(void * ctx,
27 EntityId entityId, // Entity id of entity with DataSetComponent.
28 uint32_t coordSys, // 0 -> EK80/ME70/MS70, 1-> SN90.
29 uint32_t capacity,
30 uint32_t beamCount, // Number of beams per ping
31 uint32_t sampleCount, // Number of samples per beam
32 float depthOffset, // Offset along ray of first sample.
33 float depthStep, // Spacing along ray between successive samples.
34 uint32_t useDecibel, // 0 -> values are linear, 1 -> values are in decibel.
35 uint32_t tryPreserve, // 0 -> just wipe current data in buffer, 1 -> try to resample current data to fit new config.
36 const float* transducerAlpha, // 3 x float, XYZ-angles in radians.
37 const float* transducerOffset, // 3 x float, XYZ-offset in meters.
38 const float* directionX, // majorCount * minorCount
39 const float* directionY, // majorCount * minorCount
40 const float* beamWidthX, // majorCount * minorCount
41 const float* beamWidthY); // majorCount * minorCount
42
43 typedef int(*ClearPingsPtr)(void * ctx,
44 EntityId entityId);
45
46 typedef int(*AddPingPtr)(void * ctx,
47 EntityId entityId,
48 uint32_t beamCount, // Must match config
49 uint32_t sampleCount, // Must match config
50 int64_t timestamp,
51 const float* position, // 3
52 const float* orientation, // 4, quaternion
53 const float* samples, // majorCount * minorCount * sampleCount
54 const float* bottomDepths, // null or majorCount * minorCount
55 const float* bottomReflectivities);
56
57 typedef int (*UniformGridAddConfigPtr)(void * ctx,
58 EntityId entityId,
59 uint32_t configId,
60 uint32_t coordSys,
61 uint32_t majorCount,
62 uint32_t minorCount,
63 uint32_t sampleCount,
64 float depthOffset,
65 float depthStep,
66 const float* transducerAlpha,
67 const float* transducerOffset,
68 const float* directionX,
69 const float* directionY,
70 const float* beamWidthX,
71 const float* beamWidthY);
72
73 typedef int (*UniformGridClearPingsPtr)(void * ctx, EntityId entityId);
74
75 typedef int (*UniformGridAddPingPtr)(void * ctx,
76 EntityId entityId,
77 uint32_t configId,
78 uint32_t beamCount,
79 uint32_t sampleCount,
80 int64_t timestamp,
81 const float* position,
82 const float* orientation,
83 const float* samples,
84 const float* bottomDepths,
85 const float* bottomReflectivities);
86 }
87 }
88}
89
90
91COGSECHO_API int echosounderSetConfig(void * ctx,
92 EntityId entityId,
93 uint32_t coordSys,
94 uint32_t capacity,
95 uint32_t beamCount,
96 uint32_t sampleCount,
97 float depthOffset,
98 float depthStep,
99 uint32_t useDecibel,
100 uint32_t tryPreserve,
101 const float* transducerAlpha,
102 const float* transducerOffset,
103 const float* directionX,
104 const float* directionY,
105 const float* beamWidthX,
106 const float* beamWidthY);
107
108COGSECHO_API int echosounderClearPings(void * ctx,
109 EntityId entityId);
110
111COGSECHO_API int echosounderAddPing(void * ctx,
112 EntityId entityId,
113 uint32_t beamCount,
114 uint32_t sampleCount,
115 int64_t timestamp,
116 const float* position,
117 const float* orientation,
118 const float* samples,
119 const float* bottomDepths,
120 const float* bottomReflectivities);
121
122COGSECHO_API int uniformGridAddConfig(void * ctx,
123 EntityId entityId,
124 uint32_t configId,
125 uint32_t coordSys,
126 uint32_t majorCount,
127 uint32_t minorCount,
128 uint32_t sampleCount,
129 float depthOffset,
130 float depthStep,
131 const float* transducerAlpha,
132 const float* transducerOffset,
133 const float* directionX,
134 const float* directionY,
135 const float* beamWidthX,
136 const float* beamWidthY);
137
138COGSECHO_API int uniformGridClearPings(void * ctx, EntityId entityId);
139
140COGSECHO_API int uniformGridAddPing(void * ctx,
141 EntityId entityId,
142 uint32_t configId,
143 uint32_t beamCount,
144 uint32_t sampleCount,
145 int64_t timestamp,
146 const float* position,
147 const float* orientation,
148 const float* samples,
149 const float* bottomDepths,
150 const float* bottomReflectivities);
151
uint16_t FieldId
Type used to index fields.
Definition: Name.h:54
Contains all Cogs related functionality.
Definition: FieldSetter.h:23