|
<< Click to Display Table of Contents >> Navigation: Using SMILE Wrappers > User properties |
To integrate application-specific data with SMILE, you can use user properties. User properties are arrays of key–value pairs available both at the network level and at the node level. They are stored in XDSL files and persist across I/O operations.
Each property consists of a name (key) and a value, both represented as strings in the UserProperty object. Property names must be unique within the set of properties defined for a given node or network. They follow the same conventions as SMILE identifiers. Property names starting with DSL_ are reserved for internal use.
Python
get_user_properties() -> List[UserProperty]
set_user_properties(properties: List[UserProperty]) -> None
get_node_user_properties(node: int | str) -> List[UserProperty]
set_node_user_properties(node: int | str, properties: List[UserProperty]) -> None
Java
UserProperty[] getUserProperties();
void setUserProperties(UserProperty[] properties);
UserProperty[] getNodeUserProperties(int nodeHandle);
UserProperty[] getNodeUserProperties(String nodeId);
void setNodeUserProperties(int nodeHandle, UserProperty[] properties);
void setNodeUserProperties(String nodeId, UserProperty[] properties);
C#
UserProperty[] GetUserProperties();
void SetUserProperties(UserProperty[] properties);
UserProperty[] GetNodeUserProperties(int nodeHandle);
UserProperty[] GetNodeUserProperties(string nodeId);
void SetNodeUserProperties(int nodeHandle, UserProperty[] properties);
void SetNodeUserProperties(string nodeId, UserProperty[] properties);
R
userProperties <- getUserProperties()
setUserProperties(properties)
nodeProperties <- getNodeUserProperties(nodeIdOrHandle)
setNodeUserProperties(nodeIdOrHandle, properties)