diff --git a/xoa_driver/internals/commands/enums.py b/xoa_driver/internals/commands/enums.py index ad493fab..f0b16e98 100644 --- a/xoa_driver/internals/commands/enums.py +++ b/xoa_driver/internals/commands/enums.py @@ -1192,10 +1192,27 @@ class MulticastHeaderFormat(IntEnum): class PFCMode(IntEnum): - """Priority Flow Control (PFC) Mode""" - + """The PFC CoS value of the stream""" + ZERO = 0 + """the PFC CoS value = 0""" + ONE = 1 + """the PFC CoS value = 1""" + TWO = 2 + """the PFC CoS value = 2""" + THREE = 3 + """the PFC CoS value = 3""" + FOUR = 4 + """the PFC CoS value = 4""" + FIVE = 5 + """the PFC CoS value = 5""" + SIX = 6 + """the PFC CoS value = 6""" + SEVEN = 7 + """the PFC CoS value = 7""" VLAN_PCP = 128 - """VLAN PCP""" + """PFC CoS value is automatically using the outer VLAN PCP value of the stream. If the VLAN field is missing, the stream won't have a PFC CoS.""" + OFF = 129 + """Remove PFC CoS value of the stream.""" class PRBSOnOff(IntEnum): diff --git a/xoa_driver/internals/commands/ps_commands.py b/xoa_driver/internals/commands/ps_commands.py index 579d4f87..55a20847 100644 --- a/xoa_driver/internals/commands/ps_commands.py +++ b/xoa_driver/internals/commands/ps_commands.py @@ -2078,7 +2078,7 @@ def set(self, hex_data: Hex) -> Token[None]: @dataclass class PS_PFCPRIORITY: """ - Set and get the Priority Flow Control (PFC) mode. + Set and get the Priority Flow Control (PFC) Cos value of a stream. """ code: typing.ClassVar[int] = 219 @@ -2090,27 +2090,27 @@ class PS_PFCPRIORITY: _stream_xindex: int class GetDataAttr(ResponseBodyStruct): - pcp: PFCMode = field(XmpByte()) - """coded byte, Priority Flow Control mode.""" + cos: PFCMode = field(XmpByte()) + """coded byte, the Priority Flow Control (PFC) Cos value of a stream.""" class SetDataAttr(RequestBodyStruct): - pcp: PFCMode = field(XmpByte()) - """coded byte, Priority Flow Control mode.""" + cos: PFCMode = field(XmpByte()) + """coded byte, the Priority Flow Control (PFC) Cos value of a stream.""" def get(self) -> Token[GetDataAttr]: - """Get the Priority Flow Control (PFC) mode of a stream. + """Get the the Priority Flow Control (PFC) Cos value of a stream. - :return: the Priority Flow Control mode of the stream + :return: the Priority Flow Control (PFC) Cos value of a stream. :rtype: PS_PFCPRIORITY.GetDataAttr """ return Token(self._connection, build_get_request(self, module=self._module, port=self._port, indices=[self._stream_xindex])) - def set(self, pcp: PFCMode) -> Token[None]: - """Set the Priority Flow Control (PFC) mode of a stream. + def set(self, cos: PFCMode) -> Token[None]: + """Set the Priority Flow Control (PFC) Cos value of a stream. - :param pcp: the Priority Flow Control mode of the stream - :type pcp: str + :param cos: the Priority Flow Control (PFC) Cos value of a stream. + :type cos: PFCMode """ - return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._stream_xindex], pcp=pcp)) + return Token(self._connection, build_set_request(self, module=self._module, port=self._port, indices=[self._stream_xindex], cos=cos))