|
1 | 1 | /** |
2 | 2 | * @file handler.h |
3 | 3 | */ |
4 | | -/* Copyright (C) 2022-2025 by Arjan van Vught mailto:info@gd32-dmx.org |
| 4 | +/* Copyright (C) 2022-2026 by Arjan van Vught mailto:info@gd32-dmx.org |
5 | 5 | * |
6 | 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
7 | 7 | * of this software and associated documentation files (the "Software"), to deal |
|
29 | 29 |
|
30 | 30 | #include "oscserver.h" |
31 | 31 | #include "oscsimplesend.h" |
32 | | - |
33 | 32 | #include "pixeltype.h" |
34 | 33 | #include "pixeldmx.h" |
35 | | - |
36 | 34 | #include "firmware/debug/debug_debug.h" |
37 | 35 |
|
38 | 36 | class Handler: public OscServerHandler { |
39 | 37 | public: |
40 | | - Handler(PixelDmx *pPixelDmx): m_pPixelDmx(pPixelDmx) { |
| 38 | + Handler(PixelDmx *pixel_dmx): pixel_dmx_(pixel_dmx) { |
41 | 39 | DEBUG_ENTRY(); |
42 | 40 | DEBUG_EXIT(); |
43 | 41 | } |
44 | 42 |
|
45 | 43 | void Blackout() override { |
46 | 44 | DEBUG_ENTRY(); |
47 | | - m_pPixelDmx->Blackout(true); |
| 45 | + pixel_dmx_->Blackout(true); |
48 | 46 | DEBUG_EXIT(); |
49 | 47 | } |
50 | 48 |
|
51 | 49 | void Update() override { |
52 | 50 | DEBUG_ENTRY(); |
53 | | - m_pPixelDmx->Blackout(false); |
| 51 | + pixel_dmx_->Blackout(false); |
54 | 52 | DEBUG_EXIT(); |
55 | 53 | } |
56 | 54 |
|
57 | | - void Info(int32_t nHandle, uint32_t nRemoteIp, uint16_t nPortOutgoing) override { |
58 | | - OscSimpleSend MsgSendLedType(nHandle, nRemoteIp, nPortOutgoing, "/info/ledtype", "s", const_cast<char *>(pixel::GetType(PixelConfiguration::Get().GetType()))); |
59 | | - OscSimpleSend MsgSendLedCount(nHandle, nRemoteIp, nPortOutgoing, "/info/ledcount", "i", static_cast<int>(PixelConfiguration::Get().GetCount())); |
60 | | - OscSimpleSend MsgSendGroupCount(nHandle, nRemoteIp, nPortOutgoing, "/info/groupcount", "i", static_cast<int>(PixelDmxConfiguration::Get().GetGroupingCount())); |
| 55 | + void Info(int32_t handle, uint32_t remote_ip, uint16_t port_outgoing) override { |
| 56 | + OscSimpleSend MsgSendLedType(handle, remote_ip, port_outgoing, "/info/ledtype", "s", const_cast<char *>(pixel::GetTypeName(PixelConfiguration::Get().GetType()))); |
| 57 | + OscSimpleSend MsgSendLedCount(handle, remote_ip, port_outgoing, "/info/ledcount", "i", static_cast<int>(PixelConfiguration::Get().GetCount())); |
| 58 | + OscSimpleSend MsgSendGroupCount(handle, remote_ip, port_outgoing, "/info/groupcount", "i", static_cast<int>(PixelDmxConfiguration::Get().GetGroupingCount())); |
61 | 59 | } |
62 | 60 |
|
63 | 61 | private: |
64 | | - PixelDmx *m_pPixelDmx; |
| 62 | + PixelDmx *pixel_dmx_; |
65 | 63 | }; |
66 | 64 |
|
67 | 65 | #endif /* HANDLER_H_ */ |
0 commit comments