Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inc: add an attribute for implementation templates #138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions inc/taimetadatatypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ typedef enum _tai_attr_value_type_t
*/
TAI_ATTR_VALUE_TYPE_NOTIFICATION,

/*
* @brief Attribute value is list of enums.
*/
TAI_ATTR_VALUE_TYPE_ENUMLIST,
} tai_attr_value_type_t;

/**
Expand Down
21 changes: 21 additions & 0 deletions inc/tainetworkif.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,27 @@ typedef enum _tai_network_interface_attr_t
*/
TAI_NETWORK_INTERFACE_ATTR_CLIENT_SIGNAL_MAPPING_TYPE,

/**
* @brief The implementation templates
*
* Implementation templates represent the list of transmission modes
* supported by the network interface. Implementation templates are
* described as a list of enum lists, and each transmission mode is
* expressed as a combination of enum values. Each enum list has an enum id
* (attribute id) and a list of enum values. The i-th transmission mode is a
* combination of i-th values of each enum list.
*
* Implementation templates also represent the preference among the
* transmission modes. When only a part of the parameters corresponds to the
* transmission mode is configured, then the first mode that matches the
* current configured value will be used. Therefore the head of the list is
* the default mode.
*
* @type #tai_attr_value_list_t #tai_enum_list_t
* @flags READ_ONLY
*/
TAI_NETWORK_INTERFACE_ATTR_IMPLEMENTATION_TEMPLATES,

/**
* @brief The current pre-FEC bit error rate
*
Expand Down
7 changes: 7 additions & 0 deletions inc/taitypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@ typedef struct _tai_notification_handler_t {
tai_notification_fn notify;
} tai_notification_handler_t;

typedef struct _tai_enum_list_t {
tai_attr_id_t id;
uint32_t count;
int32_t *list;
} tai_enum_list_t;

/**
* @brief Data Type
*
Expand Down Expand Up @@ -286,6 +292,7 @@ typedef union _tai_attribute_value_t
tai_object_map_list_t objmaplist;
tai_attr_value_list_t attrlist;
tai_notification_handler_t notification;
tai_enum_list_t enumlist;
} tai_attribute_value_t;

typedef struct _tai_attribute_t
Expand Down