Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/107#discussion_r118822142
  
    --- Diff: libminifi/include/FlowController.h ---
    @@ -131,9 +134,50 @@ class FlowController : public 
core::controller::ControllerServiceProvider,
           root_->updatePropertyValue(processorName, propertyName, 
propertyValue);
       }
     
    -  // set 8 bytes SerialNumber
    -  virtual void setSerialNumber(uint8_t *number) {
    -    protocol_->setSerialNumber(number);
    +  // set 6 bytes SerialNumber
    +  void setSerialNumber(uint8_t *number) {
    +    memcpy(serial_number_, number, 6);
    +  }
    +
    +  //get serial number
    +  uint8_t *getSerialNumber() {
    +    return serial_number_;
    +  }
    +
    +  // get serial number as string
    +  std::string getSerialNumberStr() {
    +    char str[18];
    +    char *strPtr = &str[0];
    +
    +    for (int i = 0; i < 6; i++) {
    --- End diff --
    
    if you use a string instead of uint8_t this can become
    ```
    std::stringstream hex;
    hex >> std::hex >> serial_number_;
    return hex.str();
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to