Nicer formatting for the PDU field documentation

This commit is contained in:
Mark Haines 2014-10-20 16:30:36 +01:00
parent ae27cbe1a4
commit 5e4b8798a4

View file

@ -110,8 +110,9 @@ receiving an "empty" transaction.)
PDUs and EDUs PDUs and EDUs
------------- -------------
.. WARNING::
This section may be misleading or inaccurate. Common PDU Fields
~~~~~~~~~~~~~~~~~
All PDUs have: All PDUs have:
- An ID - An ID
@ -121,97 +122,115 @@ All PDUs have:
(regardless of which origin sent them) (regardless of which origin sent them)
``context`` ``context``
Type: +++++++++++
String Type:
Description: String
Event context identifier Description:
Event context identifier
``origin`` ``origin``
Type: ++++++++++
String Type:
Description: String
DNS name of homeserver that created this PDU. Description:
DNS name of homeserver that created this PDU.
``pdu_id`` ``pdu_id``
Type: ++++++++++
String Type:
Description: String
Unique identifier for PDU within the context for the originating homeserver Description:
Unique identifier for PDU within the context for the originating homeserver
``ts`` ``ts``
Type: ++++++
Integer Type:
Description: Integer
Timestamp in milliseconds on originating homeserver when this PDU was Description:
created. Timestamp in milliseconds on originating homeserver when this PDU was
created.
``pdu_type`` ``pdu_type``
Type: ++++++++++++
String Type:
Description: String
PDU event type. Description:
PDU event type.
``prev_pdus`` ``prev_pdus``
Type: +++++++++++++
List of pairs of strings Type:
Description: List of pairs of strings
The originating homeserver and PDU ids of the most recent PDUs the Description:
homeserver was aware of for this context when it made this PDU. The originating homeserver and PDU ids of the most recent PDUs the
homeserver was aware of for this context when it made this PDU.
``depth`` ``depth``
Type: +++++++++
Integer Type:
Description: Integer
The maximum depth of the previous PDUs plus one. Description:
The maximum depth of the previous PDUs plus one.
.. TODO-spec paul .. TODO-spec paul
- Update this structure so that 'pdu_id' is a two-element [origin,ref] pair - Update this structure so that 'pdu_id' is a two-element [origin,ref] pair
like the prev_pdus are like the prev_pdus are
State Update PDU Fields
~~~~~~~~~~~~~~~~~~~~~~~
For state updates: For state updates:
``is_state`` ``is_state``
Type: ++++++++++++
Boolean Type:
Description: Boolean
True if this PDU is updating state. Description:
True if this PDU is updating state.
``state_key`` ``state_key``
Type: +++++++++++++
String Type:
Description: String
Optional key identifying the updated state within the context. Description:
Optional key identifying the updated state within the context.
``power_level`` ``power_level``
Type: +++++++++++++++
Integer Type:
Description: Integer
The asserted power level of the user performing the update. Description:
The asserted power level of the user performing the update.
``required_power_level`` ``required_power_level``
Type: ++++++++++++++++++++++++
Integer Type:
Description: Integer
The required power level needed to replace this update. Description:
The required power level needed to replace this update.
``prev_state_id`` ``prev_state_id``
Type: +++++++++++++++++
String Type:
Description: String
PDU event type. Description:
PDU event type.
``prev_state_origin`` ``prev_state_origin``
Type: +++++++++++++++++++++
String Type:
Description: String
The PDU id of the update this replaces. Description:
The PDU id of the update this replaces.
``user_id`` ``user_id``
Type: +++++++++++
String Type:
Description: String
The user updating the state. Description:
The user updating the state.
:: ::