support for component names
This commit is contained in:
parent
a761675e89
commit
b5e4c05922
|
@ -24,18 +24,42 @@
|
|||
#pragma once
|
||||
|
||||
#include "../uuid/uuid.h"
|
||||
#include <string>
|
||||
|
||||
namespace ACN {
|
||||
|
||||
// 2.1. ACN Components and Component Identifiers (CIDs)
|
||||
class Component {
|
||||
public:
|
||||
Component(UUID::uuid cid = UUID::uuid()) { cid_ = cid; };
|
||||
Component(UUID::uuid cid = UUID::uuid())
|
||||
: cid_(cid)
|
||||
, fctn_(std::string("libESTA ACN Component"))
|
||||
, uacn_(std::string())
|
||||
{};
|
||||
|
||||
const UUID::uuid cid() const { return cid_; };
|
||||
const UUID::uuid cid() const { return cid_; }
|
||||
const std::string fixedName() const { return fctn_; }
|
||||
const std::string userName() const { return uacn_; }
|
||||
const std::string name() const { return uacn_.empty() ? fctn_ : uacn_; }
|
||||
|
||||
void assignUserName(const std::string s) { uacn_ = s; }
|
||||
|
||||
private:
|
||||
UUID::uuid cid_;
|
||||
const UUID::uuid cid_;
|
||||
|
||||
// EPI 19: ACN Discovery on IP Networks
|
||||
// 3. Component Name Strings
|
||||
// Each component shall maintain two text identifier strings intended to
|
||||
// indicate the function of the component in human readable terms for browsing
|
||||
// purposes.
|
||||
|
||||
// 3.1. Fixed Component Type Name (FCTN)
|
||||
// shall be a UTF-8 string that is assigned during manufacture.
|
||||
const std::string fctn_;
|
||||
|
||||
// 3.2. User Assigned Component Name (UACN)
|
||||
// shall be a UTF-8 string that may be assigned by the user.
|
||||
std::string uacn_;
|
||||
};
|
||||
|
||||
}; // ACN
|
||||
|
|
Loading…
Reference in New Issue