Skip to content

Commit

Permalink
Merge branch '0.10' of https://github.com/openlightingproject/ola int…
Browse files Browse the repository at this point in the history
…o master-resync
  • Loading branch information
peternewman committed Feb 17, 2020
2 parents dd4fb74 + 79ca37d commit ac4a401
Show file tree
Hide file tree
Showing 20 changed files with 61 additions and 18 deletions.
1 change: 1 addition & 0 deletions .codespellignorelines
Expand Up @@ -8,6 +8,7 @@
* Renamed protocol convertor(sic) to protocol converter in the RDM code (C++
* Renamed valiator(sic) to validator, incomming(sic) to incoming, mimimun(sic)
to minimum and overiding(sic) to overriding, all of which may or may not
* Renamed RESONSE_INVALID_DESTINATION(sic) to RESPONSE_INVALID_DESTINATION in
/^(?:([0-9]{1,3})(?:\s(THRU)\s(?:([0-9]{1,3}))?)?(?:\s(@)\s(?:([0-9]{1,3}|FULL))?)?)/;
* channel_range ::= "ALL" | "*" | channel "THRU" channel | channel > channel
/(?:([0-9]{1,3})(?:\s+THRU\s+([0-9]{0,3}))?)\s+@\s+([0-9]{0,3})$/);
Expand Down
2 changes: 2 additions & 0 deletions NEWS
Expand Up @@ -30,6 +30,8 @@ x/y/2019 ola-0.10.8
* Fix an RDM discovery bug for how we handle phantom UIDs
* Ensure _close_callback is assigned before we might need to run it in the
Python API
* Renamed RESONSE_INVALID_DESTINATION(sic) to RESPONSE_INVALID_DESTINATION in
the ArduinoWidget code

Internal:
*
Expand Down
10 changes: 10 additions & 0 deletions common/rdm/RDMHelper.cpp
Expand Up @@ -201,6 +201,16 @@ string NackReasonToString(uint16_t reason) {
return "Invalid endpoint mode";
case NR_UNKNOWN_UID:
return "Unknown UID";
case NR_UNKNOWN_SCOPE:
return "Unknown scope";
case NR_INVALID_STATIC_CONFIG_TYPE:
return "Invalid static config type";
case NR_INVALID_IPV4_ADDRESS:
return "Invalid IPv4 address";
case NR_INVALID_IPV6_ADDRESS:
return "Invalid IPv6 address";
case NR_INVALID_PORT:
return "Invalid port";
default:
ostringstream str;
str << "Unknown, was " << reason;
Expand Down
7 changes: 4 additions & 3 deletions include/ola/acn/ACNVectors.h
Expand Up @@ -61,7 +61,7 @@ enum DMPVector {
* @brief Vectors used at the E1.31 layer.
*/
enum E131Vector {
VECTOR_E131_DATA = 2, /**< DMP data (DATA_PACKET_VECTOR( */
VECTOR_E131_DATA = 2, /**< DMP data (DATA_PACKET_VECTOR) */
VECTOR_E131_SYNC = 3, /**< Sync data (SYNC_PACKET_VECTOR) */
VECTOR_E131_DISCOVERY = 4, /**< Discovery data (DISCOVERY_PACKET_VECTOR) */
};
Expand All @@ -86,10 +86,11 @@ enum E133ControllerVector {
VECTOR_CONTROLLER_DEVICE_RELEASED = 4, /**< Device released message */
VECTOR_CONTROLLER_EXPECT_MASTER = 5, /**< Expect master message */
};
} // namespace acn
} // namespace ola

/**
* @}
*/
} // namespace acn
} // namespace ola

#endif // INCLUDE_OLA_ACN_ACNVECTORS_H_
2 changes: 1 addition & 1 deletion include/ola/acn/CID.h
Expand Up @@ -15,7 +15,7 @@
*
* CID.h
* The CID class, this just wraps a CIDImpl so we don't need to include all the
* UID headers.
* UUID headers.
* Copyright (C) 2007 Simon Newton
*/

Expand Down
2 changes: 1 addition & 1 deletion include/ola/rdm/RDMAPIImplInterface.h
Expand Up @@ -43,7 +43,7 @@ namespace rdm {
* @brief Represents the state of a response and/or any error codes.
*
* RDM Handlers should first check for error being non-empty as this
* represents an underlying transport error. Then the resonse_code
* represents an underlying transport error. Then the response_code
* should be checked to catch invalid responses, timeouts etc. Finally, the
* value of response_type should be checked against the rdm_response_type
* codes.
Expand Down
2 changes: 1 addition & 1 deletion include/ola/rdm/RDMCommand.h
Expand Up @@ -515,7 +515,7 @@ class RDMResponse: public RDMCommand {

/**
* @brief The Response Type.
* @returns The Response Typpe (ACK, NACK, etc.)
* @returns The Response Type (ACK, NACK, etc.)
*/
uint8_t ResponseType() const { return m_port_id; }

Expand Down
7 changes: 6 additions & 1 deletion include/ola/rdm/RDMEnums.h
Expand Up @@ -346,7 +346,12 @@ typedef enum {
NR_ACTION_NOT_SUPPORTED = 0x000B,
NR_ENDPOINT_NUMBER_INVALID = 0x000C,
NR_INVALID_ENDPOINT_MODE = 0x000D,
NR_UNKNOWN_UID = 0x000E
NR_UNKNOWN_UID = 0x000E,
NR_UNKNOWN_SCOPE = 0x000F,
NR_INVALID_STATIC_CONFIG_TYPE = 0x0010,
NR_INVALID_IPV4_ADDRESS = 0x0011,
NR_INVALID_IPV6_ADDRESS = 0x0012,
NR_INVALID_PORT = 0x0013
} rdm_nack_reason;


Expand Down
2 changes: 1 addition & 1 deletion libs/acn/e131_transmit_test.cpp
Expand Up @@ -14,7 +14,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* e131_transmit_test.cpp
* The sends custom E1.31 packets in order to test the implementation of a
* This sends custom E1.31 packets in order to test the implementation of a
* remote node.
* Copyright (C) 2010 Simon Newton
*
Expand Down
2 changes: 1 addition & 1 deletion plugins/artnet/ArtNetNodeTest.cpp
Expand Up @@ -391,7 +391,7 @@ void ArtNetNodeTest::testBasicBehaviour() {
// enable an input port and check that we send a poll
ExpectedBroadcast(POLL_MESSAGE, sizeof(POLL_MESSAGE));

// we should see an unsolicted poll reply sent because conditions have
// we should see an unsolicited poll reply sent because conditions have
// changed.
uint8_t expected_poll_reply_packet[sizeof(POLL_REPLY_MESSAGE)];
memcpy(expected_poll_reply_packet, POLL_REPLY_MESSAGE,
Expand Down
4 changes: 2 additions & 2 deletions plugins/usbpro/ArduinoWidget.cpp
Expand Up @@ -51,7 +51,7 @@ const uint8_t ArduinoWidgetImpl::RESPONSE_OK = 0;
const uint8_t ArduinoWidgetImpl::RESPONSE_WAS_BROADCAST = 1;
const uint8_t ArduinoWidgetImpl::RESPONSE_FAILED = 2;
const uint8_t ArduinoWidgetImpl::RESPONSE_FAILED_CHECKSUM = 3;
const uint8_t ArduinoWidgetImpl::RESONSE_INVALID_DESTINATION = 4;
const uint8_t ArduinoWidgetImpl::RESPONSE_INVALID_DESTINATION = 4;
const uint8_t ArduinoWidgetImpl::RESPONSE_INVALID_COMMAND = 5;


Expand Down Expand Up @@ -179,7 +179,7 @@ void ArduinoWidgetImpl::HandleRDMResponse(const uint8_t *data,
case RESPONSE_FAILED_CHECKSUM:
OLA_WARN << "USB Device reports checksum mismatch";
break;
case RESONSE_INVALID_DESTINATION:
case RESPONSE_INVALID_DESTINATION:
OLA_WARN << "USB Device reports invalid destination";
break;
case RESPONSE_INVALID_COMMAND:
Expand Down
2 changes: 1 addition & 1 deletion plugins/usbpro/ArduinoWidget.h
Expand Up @@ -78,7 +78,7 @@ class ArduinoWidgetImpl: public BaseUsbProWidget,
static const uint8_t RESPONSE_WAS_BROADCAST;
static const uint8_t RESPONSE_FAILED;
static const uint8_t RESPONSE_FAILED_CHECKSUM;
static const uint8_t RESONSE_INVALID_DESTINATION;
static const uint8_t RESPONSE_INVALID_DESTINATION;
static const uint8_t RESPONSE_INVALID_COMMAND;
};

Expand Down
15 changes: 15 additions & 0 deletions plugins/usbpro/DmxTriWidget.cpp
Expand Up @@ -1000,6 +1000,21 @@ bool DmxTriWidgetImpl::ReturnCodeToNackReason(
case EC_UNKNOWN_UID:
*reason = ola::rdm::NR_UNKNOWN_UID;
break;
case EC_UNKNOWN_SCOPE:
*reason = ola::rdm::NR_UNKNOWN_SCOPE;
break;
case EC_INVALID_STATIC_CONFIG_TYPE:
*reason = ola::rdm::NR_INVALID_STATIC_CONFIG_TYPE;
break;
case EC_INVALID_IPV4_ADDRESS:
*reason = ola::rdm::NR_INVALID_IPV4_ADDRESS;
break;
case EC_INVALID_IPV6_ADDRESS:
*reason = ola::rdm::NR_INVALID_IPV6_ADDRESS;
break;
case EC_INVALID_PORT:
*reason = ola::rdm::NR_INVALID_PORT;
break;
default:
return false;
}
Expand Down
5 changes: 5 additions & 0 deletions plugins/usbpro/DmxTriWidget.h
Expand Up @@ -195,6 +195,11 @@ class DmxTriWidgetImpl: public BaseUsbProWidget,
EC_ENDPOINT_NUMBER_INVALID = 0x2c, // this is a guess
EC_INVALID_ENDPOINT_MODE = 0x2d, // this is a guess
EC_UNKNOWN_UID = 0x2e, // this is a guess
EC_UNKNOWN_SCOPE = 0x2f, // this is a guess
EC_INVALID_STATIC_CONFIG_TYPE = 0x30, // this is a guess
EC_INVALID_IPV4_ADDRESS = 0x31, // this is a guess
EC_INVALID_IPV6_ADDRESS = 0x32, // this is a guess
EC_INVALID_PORT = 0x33 // this is a guess
} dmx_tri_error_codes;
// TODO(Peter): try and test the guessed values

Expand Down
5 changes: 5 additions & 0 deletions python/ola/OlaClient.py
Expand Up @@ -403,6 +403,11 @@ class RDMNack(object):
'NR_ENDPOINT_NUMBER_INVALID': (12, 'Endpoint number invalid'),
'NR_INVALID_ENDPOINT_MODE': (13, 'Invalid endpoint mode'),
'NR_UNKNOWN_UID': (14, 'Unknown UID'),
'NR_UNKNOWN_SCOPE': (15, 'Unknown scope'),
'NR_INVALID_STATIC_CONFIG_TYPE': (16, 'Invalid static config type'),
'NR_INVALID_IPV4_ADDRESS': (17, 'Invalid IPv4 address'),
'NR_INVALID_IPV6_ADDRESS': (18, 'Invalid IPv6 address'),
'NR_INVALID_PORT': (19, 'Invalid port'),
}

# this is populated below
Expand Down
3 changes: 1 addition & 2 deletions tools/e133/E133Device.cpp
Expand Up @@ -205,8 +205,7 @@ void E133Device::EndpointRequest(
const string &raw_request) {
IPV4SocketAddress target = transport_header->Source();
uint16_t endpoint_id = e133_header->Endpoint();
OLA_INFO << "Got request for to endpoint " << endpoint_id
<< " from " << target;
OLA_INFO << "Got request for endpoint " << endpoint_id << " from " << target;

E133EndpointInterface *endpoint = NULL;
if (endpoint_id)
Expand Down
2 changes: 1 addition & 1 deletion tools/e133/EndpointManager.cpp
Expand Up @@ -47,7 +47,7 @@ bool EndpointManager::RegisterEndpoint(uint16_t endpoint_id,

/**
* Unregister a E133Endpoint
* @param endpoint_id the index of the endpont to un-register
* @param endpoint_id the index of the endpoint to un-register
*/
void EndpointManager::UnRegisterEndpoint(uint16_t endpoint_id) {
if (ola::STLRemove(&m_endpoint_map, endpoint_id)) {
Expand Down
2 changes: 1 addition & 1 deletion tools/e133/SimpleE133Node.cpp
Expand Up @@ -139,7 +139,7 @@ void SimpleE133Node::DumpTCPStats() {


/**
* Send an unsolicted message on the TCP connection
* Send an unsolicited message on the TCP connection
*/
void SimpleE133Node::SendUnsolicited() {
OLA_INFO << "Sending unsolicited TCP stats message";
Expand Down
2 changes: 1 addition & 1 deletion tools/e133/e133-controller.cpp
Expand Up @@ -60,7 +60,7 @@ DEFINE_s_uint16(endpoint, e, 0, "The endpoint to use");
DEFINE_s_string(target, t, "", "List of IPs to connect to");
DEFINE_string(listen_ip, "", "The IP address to listen on");
DEFINE_s_string(pid_location, p, "",
"The directory to read PID definitiions from");
"The directory to read PID definitions from");
DEFINE_s_default_bool(set, s, false, "Perform a SET (default is GET)");
DEFINE_default_bool(list_pids, false, "Display a list of pids");
DEFINE_s_string(uid, u, "", "The UID of the device to control.");
Expand Down
2 changes: 1 addition & 1 deletion tools/e133/e133-monitor.cpp
Expand Up @@ -58,7 +58,7 @@ using std::string;
using std::vector;

DEFINE_s_string(pid_location, p, "",
"The directory to read PID definitiions from");
"The directory to read PID definitions from");
DEFINE_s_string(target_addresses, t, "",
"List of IPs to connect to");

Expand Down

0 comments on commit ac4a401

Please sign in to comment.