Skip to content

Commit 17ee1ba

Browse files
committed
Sync with local development
1 parent 3e4ce28 commit 17ee1ba

File tree

79 files changed

+1299
-1381
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1299
-1381
lines changed

lib-arm/.settings/language.settings.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
66
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
77
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
8-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-869171961626701684" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
8+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-869089724981581684" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
99
<language-scope id="org.eclipse.cdt.core.gcc"/>
1010
<language-scope id="org.eclipse.cdt.core.g++"/>
1111
</provider>
@@ -17,7 +17,7 @@
1717
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
1818
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
1919
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
20-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1923799119167841812" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
20+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1923881355812961812" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
2121
<language-scope id="org.eclipse.cdt.core.gcc"/>
2222
<language-scope id="org.eclipse.cdt.core.g++"/>
2323
</provider>

lib-artnet/.cproject

+12
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@
359359
<listOptionValue builtIn="false" value="__GIC_PRESENT=1"/>
360360
<listOptionValue builtIn="false" value="__FPU_PRESENT"/>
361361
<listOptionValue builtIn="false" value="BARE_METAL"/>
362+
<listOptionValue builtIn="false" value="RDM_CONTROLLER"/>
363+
<listOptionValue builtIn="false" value="ARTNET_VERSION=4"/>
362364
</option>
363365
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.653222067" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths" valueType="includePath">
364366
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/>
@@ -368,6 +370,8 @@
368370
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-hal/include}&quot;"/>
369371
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-lightset/include}&quot;"/>
370372
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-network/include}&quot;"/>
373+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-rdm/include}&quot;"/>
374+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-e131/include}&quot;"/>
371375
</option>
372376
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.1115950689" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
373377
</tool>
@@ -379,6 +383,8 @@
379383
<listOptionValue builtIn="false" value="__GIC_PRESENT=1"/>
380384
<listOptionValue builtIn="false" value="__FPU_PRESENT"/>
381385
<listOptionValue builtIn="false" value="BARE_METAL"/>
386+
<listOptionValue builtIn="false" value="RDM_CONTROLLER"/>
387+
<listOptionValue builtIn="false" value="ARTNET_VERSION=4"/>
382388
</option>
383389
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.510275320" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
384390
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/>
@@ -388,6 +394,8 @@
388394
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-hal/include}&quot;"/>
389395
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-lightset/include}&quot;"/>
390396
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-network/include}&quot;"/>
397+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-rdm/include}&quot;"/>
398+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-e131/include}&quot;"/>
391399
</option>
392400
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.2134415444" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
393401
</tool>
@@ -399,6 +407,8 @@
399407
<listOptionValue builtIn="false" value="__GIC_PRESENT=1"/>
400408
<listOptionValue builtIn="false" value="__FPU_PRESENT"/>
401409
<listOptionValue builtIn="false" value="BARE_METAL"/>
410+
<listOptionValue builtIn="false" value="RDM_CONTROLLER"/>
411+
<listOptionValue builtIn="false" value="ARTNET_VERSION=4"/>
402412
</option>
403413
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths.1645629639" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
404414
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/>
@@ -408,6 +418,8 @@
408418
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-hal/include}&quot;"/>
409419
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-lightset/include}&quot;"/>
410420
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-network/include}&quot;"/>
421+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-rdm/include}&quot;"/>
422+
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/lib-e131/include}&quot;"/>
411423
</option>
412424
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.391517827" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
413425
</tool>

lib-artnet/.settings/language.settings.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
66
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
77
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="([^/\\\\]*)((g?cc)|([gc]\+\+)|(clang))" prefer-non-shared="true"/>
8-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-869171961626701684" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
8+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-869089724981581684" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
99
<language-scope id="org.eclipse.cdt.core.gcc"/>
1010
<language-scope id="org.eclipse.cdt.core.g++"/>
1111
</provider>
@@ -17,7 +17,7 @@
1717
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
1818
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
1919
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
20-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-869171961626701684" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
20+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-869089724981581684" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
2121
<language-scope id="org.eclipse.cdt.core.gcc"/>
2222
<language-scope id="org.eclipse.cdt.core.g++"/>
2323
</provider>
@@ -26,7 +26,7 @@
2626
</configuration>
2727
<configuration id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.309283989.303033930.1702909156.1968016134.361802700" name="H3">
2828
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
29-
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="true" env-hash="650233201082877679" id="org.eclipse.embedcdt.managedbuild.cross.arm.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Arm Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
29+
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="true" env-hash="671977907827862671" id="org.eclipse.embedcdt.managedbuild.cross.arm.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Arm Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
3030
<language-scope id="org.eclipse.cdt.core.gcc"/>
3131
<language-scope id="org.eclipse.cdt.core.g++"/>
3232
</provider>

lib-artnet/include/artnet.h

+34-11
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,14 @@ struct PortCommand {
199199
static constexpr uint8_t RDM_DISABLE3 = 0xd3; ///< Disable RDM on output port 3
200200
};
201201

202+
struct TodControlCommand {
203+
static constexpr uint8_t ATC_NONE = 0x00; ///< No action.
204+
static constexpr uint8_t ATC_FLUSH = 0x01; ///< The port flushes its TOD and instigates full discovery.
205+
static constexpr uint8_t ATC_END = 0x02; ///< The port ends current discovery but does not flush ToD.
206+
static constexpr uint8_t ATC_INCON = 0x03; ///< The port enables incremental discovery.
207+
static constexpr uint8_t ATC_INCOFF = 0x04; ///< The port disables incremental discovery.
208+
};
209+
202210
struct Program {
203211
static constexpr uint8_t NO_CHANGE = 0x7F;
204212
static constexpr uint8_t DEFAULTS = 0x00;
@@ -239,16 +247,19 @@ struct Status2 {
239247
};
240248

241249
struct Status3 {
242-
static constexpr uint8_t NETWORKLOSS_MASK = (3U << 6); ///< bit 76
243-
static constexpr uint8_t NETWORKLOSS_LAST_STATE = (0 << 6); ///< bit 76 = 00 If network data is lost, it will hold last state
244-
static constexpr uint8_t NETWORKLOSS_OFF_STATE = (1U << 6); ///< bit 76 = 01 If network data is lost, it will set all outputs to off state
245-
static constexpr uint8_t NETWORKLOSS_ON_STATE = (2U << 6); ///< bit 76 = 10 If network data is lost, it will set all outputs to full on
246-
static constexpr uint8_t NETWORKLOSS_PLAYBACK = (3U << 6); ///< bit 76 = 11 If network data is lost, it will playback the fail-over scene
247-
static constexpr uint8_t FAILSAFE_NO_CONTROL = (0 << 5); ///< bit 5 = 0 Node is not able to control failsafe mode by ArtCommand
248-
static constexpr uint8_t FAILSAFE_CONTROL = (1U << 5); ///< bit 5 = 1 Node is able to control failsafe mode by ArtCommand
249-
static constexpr uint8_t SUPPORTS_LLRP = (1U << 4); ///< bit 4 = 1 Node supports LLRP (Low Level Recovery Protocol
250-
static constexpr uint8_t OUTPUT_NO_SWITCH = (0 << 3); ///< bit 3 = 0 Outputs cannot be switched to an input
251-
static constexpr uint8_t OUTPUT_SWITCH = (1U << 3); ///< bit 3 = 1 Outputs can be switched to an input
250+
static constexpr uint8_t NETWORKLOSS_MASK = (3U << 6); ///< bit 76
251+
static constexpr uint8_t NETWORKLOSS_LAST_STATE = (0 << 6); ///< bit 76 = 00 If network data is lost, it will hold last state
252+
static constexpr uint8_t NETWORKLOSS_OFF_STATE = (1U << 6); ///< bit 76 = 01 If network data is lost, it will set all outputs to off state
253+
static constexpr uint8_t NETWORKLOSS_ON_STATE = (2U << 6); ///< bit 76 = 10 If network data is lost, it will set all outputs to full on
254+
static constexpr uint8_t NETWORKLOSS_PLAYBACK = (3U << 6); ///< bit 76 = 11 If network data is lost, it will playback the fail-over scene
255+
static constexpr uint8_t FAILSAFE_NO_CONTROL = (0 << 5); ///< bit 5 = 0 Node is not able to control failsafe mode by ArtCommand
256+
static constexpr uint8_t FAILSAFE_CONTROL = (1U << 5); ///< bit 5 = 1 Node is able to control failsafe mode by ArtCommand
257+
static constexpr uint8_t SUPPORTS_LLRP = (1U << 4); ///< bit 4 = 1 Node supports LLRP (Low Level Recovery Protocol
258+
static constexpr uint8_t OUTPUT_NO_SWITCH = (0 << 3); ///< bit 3 = 0 Outputs cannot be switched to an input
259+
static constexpr uint8_t OUTPUT_SWITCH = (1U << 3); ///< bit 3 = 1 Outputs can be switched to an input
260+
static constexpr uint8_t SUPPORTS_RDMNET = (1U << 2); ///< bit 2 = 1 Node supports RDMnet
261+
static constexpr uint8_t SUPPORTS_BACKGROUNDQUEUE = (1U << 1); ///< bit 1 = 1 BackgroundQueue is supported
262+
static constexpr uint8_t SUPPORTS_BACKGROUNDDISCOVERY = (1U << 0); ///< bit 0 = 1 Programmable background discovery is supported.
252263
};
253264

254265
struct Flags {
@@ -281,6 +292,10 @@ struct GoodOutputB {
281292
static constexpr uint8_t RDM_ENABLED = (0 << 7); ///< bit 7 = 0 RDM is enabled.
282293
static constexpr uint8_t STYLE_CONSTANT = (1U << 6); ///< bit 6 = 1 Output style is continuous.
283294
static constexpr uint8_t STYLE_DELTA = (0 << 6); ///< bit 6 = 0 Output style is delta.
295+
static constexpr uint8_t DISCOVERY_NOT_RUNNING = (1U << 5); ///< bit 5 = 1 Discovery is currently not running.
296+
static constexpr uint8_t DISCOVERY_IS_RUNNING = (0 << 5); ///< bit 5 = 0 Discovery is currently running.
297+
static constexpr uint8_t DISCOVERY_DISABLED = (1U << 4); ///< bit 4 = 1 Background discovery is disabled.
298+
static constexpr uint8_t DISCOVERY_ENABLED = (0 << 4); ///< bit 4 = 0 Background Discovery is enabled.
284299
};
285300

286301
struct GoodInput {
@@ -401,7 +416,15 @@ struct ArtPollReply {
401416
uint8_t GoodOutputB[artnet::PORTS]; ///< This array defines output status of the node.
402417
uint8_t Status3; ///< General Status register
403418
uint8_t DefaultUidResponder[6]; ///< RDMnet & LLRP UID
404-
uint8_t Filler[15]; ///< Transmit as zero. For future expansion.
419+
uint8_t UserHi; ///< Available for user specific data
420+
uint8_t UserLo; ///< Available for user specific data
421+
uint8_t RefreshRateHi; ///< Hi byte of RefreshRate
422+
uint8_t RefreshRateLo; ///< Lo Byte of RefreshRate.
423+
///< RefreshRate allows the device to specify the maximum refresh rate, expressed in Hz, at which it can process ArtDmx.
424+
///< This is designed to allow refresh rates above DMX512 rates, for gateways that implement other protocols such as SPI.
425+
///< A value of 0 to 44 represents the maximum DMX512 rate of 44Hz.
426+
uint8_t BackgroundQueuePolicy; ///< The BackgroundQueuePolicy defines the method by with the node retrieves STATUS_MESSAGE and QUEUED_MESSAGE pids from the connected RDM devices.
427+
uint8_t Filler[10]; ///< Transmit as zero. For future expansion.
405428
}PACKED;
406429

407430
/**

lib-artnet/include/artnetnode.h

+21-14
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,12 @@ class ArtNetNode {
395395
return !((m_OutputPort[nPortIndex].GoodOutputB & artnet::GoodOutputB::RDM_DISABLED) == artnet::GoodOutputB::RDM_DISABLED);
396396
}
397397

398+
void SetRdmDiscovery(const uint32_t nPortIndex, const bool bEnable);
399+
bool GetRdmDiscovery(const uint32_t nPortIndex) const {
400+
assert(nPortIndex < artnetnode::MAX_PORTS);
401+
return !((m_OutputPort[nPortIndex].GoodOutputB & artnet::GoodOutputB::DISCOVERY_DISABLED) == artnet::GoodOutputB::DISCOVERY_DISABLED);
402+
}
403+
398404
#if defined (RDM_CONTROLLER)
399405
void SetRdmController(ArtNetRdmController *pArtNetRdmController, const bool doEnable = true);
400406

@@ -425,7 +431,11 @@ class ArtNetNode {
425431
bool RdmIsRunning(const uint32_t nPortIndex, bool& bIsIncremental) {
426432
uint32_t nRdmnPortIndex;
427433
if (m_pArtNetRdmController->IsRunning(nRdmnPortIndex, bIsIncremental)) {
428-
return (nRdmnPortIndex == nPortIndex);
434+
const auto isRunning = (nRdmnPortIndex == nPortIndex);
435+
if (isRunning) {
436+
assert(!((m_OutputPort[nPortIndex].GoodOutputB & artnet::GoodOutputB::DISCOVERY_NOT_RUNNING) == artnet::GoodOutputB::DISCOVERY_NOT_RUNNING));
437+
}
438+
return isRunning;
429439
}
430440

431441
return false;
@@ -466,11 +476,7 @@ class ArtNetNode {
466476
}
467477

468478
void SetTimeCodeIp(const uint32_t nDestinationIp) {
469-
if (Network::Get()->IsValidIp(nDestinationIp)) {
470-
m_Node.IPAddressTimeCode = nDestinationIp;
471-
} else {
472-
m_Node.IPAddressTimeCode = Network::Get()->GetBroadcastIp();
473-
}
479+
m_Node.IPAddressTimeCode = nDestinationIp;
474480
}
475481
#endif
476482

@@ -480,13 +486,8 @@ class ArtNetNode {
480486

481487
void SetDestinationIp(const uint32_t nPortIndex, const uint32_t nDestinationIp) {
482488
if (nPortIndex < artnetnode::MAX_PORTS) {
483-
if (Network::Get()->IsValidIp(nDestinationIp)) {
484-
m_InputPort[nPortIndex].nDestinationIp = nDestinationIp;
485-
} else {
486-
m_InputPort[nPortIndex].nDestinationIp = Network::Get()->GetBroadcastIp();
487-
}
488-
489-
DEBUG_PRINTF("m_nDestinationIp=" IPSTR, IP2STR(m_InputPort[nPortIndex].nDestinationIp));
489+
m_InputPort[nPortIndex].nDestinationIp = nDestinationIp;
490+
DEBUG_PRINTF("nDestinationIp=" IPSTR, IP2STR(m_InputPort[nPortIndex].nDestinationIp));
490491
}
491492
}
492493

@@ -646,7 +647,10 @@ class ArtNetNode {
646647

647648
#if defined (RDM_CONTROLLER)
648649
bool RdmDiscoveryRun() {
649-
if ((GetPortDirection(m_State.rdm.nDiscoveryPortIndex) == lightset::PortDir::OUTPUT) && (GetRdm(m_State.rdm.nDiscoveryPortIndex))) {
650+
if ((GetPortDirection(m_State.rdm.nDiscoveryPortIndex) == lightset::PortDir::OUTPUT)
651+
&& (GetRdm(m_State.rdm.nDiscoveryPortIndex))
652+
&& (GetRdmDiscovery(m_State.rdm.nDiscoveryPortIndex)))
653+
{
650654
uint32_t nPortIndex;
651655
bool bIsIncremental;
652656

@@ -663,13 +667,16 @@ class ArtNetNode {
663667
m_pLightSet->Start(nPortIndex);
664668
}
665669

670+
m_OutputPort[m_State.rdm.nDiscoveryPortIndex].GoodOutputB |= artnet::GoodOutputB::DISCOVERY_NOT_RUNNING;
671+
666672
m_State.rdm.nDiscoveryPortIndex++;
667673
return (m_State.rdm.nDiscoveryPortIndex != artnetnode::MAX_PORTS);
668674
}
669675

670676
if (!m_pArtNetRdmController->IsRunning(nPortIndex, bIsIncremental)) {
671677
DEBUG_PRINTF("RDM Discovery Incremental -> %u", static_cast<unsigned int>(m_State.rdm.nDiscoveryPortIndex));
672678
m_pArtNetRdmController->Incremental(m_State.rdm.nDiscoveryPortIndex);
679+
m_OutputPort[m_State.rdm.nDiscoveryPortIndex].GoodOutputB &= static_cast<uint8_t>(~artnet::GoodOutputB::DISCOVERY_NOT_RUNNING);
673680
}
674681

675682
return true;

lib-artnet/include/artnetrdmcontroller.h

+13
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,19 @@ class ArtNetRdmController final: public RDMDeviceController, RDMDiscovery {
6161
DEBUG_EXIT
6262
}
6363

64+
void Stop(const uint32_t nPortIndex) {
65+
DEBUG_ENTRY
66+
assert(nPortIndex < artnetnode::MAX_PORTS);
67+
bool bIsIncremental;
68+
uint32_t _nPortIndex;
69+
if (IsRunning(_nPortIndex, bIsIncremental)) {
70+
if (_nPortIndex == nPortIndex) {
71+
RDMDiscovery::Stop();
72+
}
73+
}
74+
DEBUG_EXIT
75+
}
76+
6477
uint32_t GetUidCount(const uint32_t nPortIndex) {
6578
assert(nPortIndex < artnetnode::MAX_PORTS);
6679
return m_pRDMTod[nPortIndex].GetUidCount();

0 commit comments

Comments
 (0)