Enhancement Sub-Protocol v2.0 · Categories 1100 & 1101
Commands & Context Declaration
Two Wave categories added in BitPads v2.0 extend the enhancement layer with compact command sequencing and dynamic context management.
Category 1100 Compact Command fills the gap between a single Wave command (Category 0011, one Task short form) and a full Record with Layer 1 overhead. It delivers discrete typed command queues in 1–3 bytes per command, using a structured 3+5 bit split to express 8 command classes and 32 codes within each class.
Category 1101 Context Declaration allows the transmitter to scope interpretation context across any span from a single byte to an entire remaining session. A single declaration can switch domain, activate compound mode, override currency, or remap signal slots — without opening a new Record or Layer 1.
Both categories operate at the Wave layer. Meta byte 1 bit 1 is 0 (Wave mode), bit 4 is 1 (category mode), and bits 5–8 carry the category code 1100 or 1101. Neither requires Layer 1. Neither carries payload in the sense of a valued record.
Category 1100 — Compact Command
- Meta byte 1 + command byte(s)
- 1-byte command: 3-bit class + 5-bit code
- Optional 1-byte parameter
- 8 classes × 32 codes = 256 base commands
- Class 111 Extended adds 256 per profile
- Stream closed by length, EOT, or new Meta byte
Category 1101 — Context Declaration
- Meta byte 1 + declaration block (1–4 bytes)
- Declaration Type byte — what is declared
- Scope Level byte — how far it applies
- Optional parameter bytes per type
- 0x07–0xFF user-defined declaration types
- Session scope requires Layer 1 re-ACK
Wave-layer position: Category 1100 and 1101 transmissions are Wave-mode units. Meta byte 1 bits 5–8 = 1100 or 1101 with bit 4 = 1 (category mode) and bit 1 = 0 (Wave). The receiver enters parser state 3D (Compact Command) or 3E (Context Declaration) respectively.
Category 1100
Compact Command Mode
Compact Command Mode transmits a queue of discrete, typed commands at minimum wire cost. Each command occupies one byte in the command class + code format, with an optional second parameter byte for commands that require a value or target specifier.
Command Byte — 3+5 Bit Structure
The single command byte is divided into a 3-bit upper field carrying the command class and a 5-bit lower field carrying the command code within that class.
Class
Code
Activation Structure
The 8 Command Classes
Classes 000 through 110 are standard. Class 111 is Extended — the next byte carries an 8-bit command code giving 256 additional commands per domain profile.
| Class (bits 1–3) | Name | Key Codes (bits 4–8) | Parameter Byte |
|---|---|---|---|
000 ▾ |
System Control | 00001=NOP/Ping · 00010=Reset · 00011=Sync · 00100=Checkpoint save · 00101=Checkpoint restore · 00110=Mode shift · 00111=Status request |
Code-dependent (Mode shift: target mode byte) |
Separator CodesCodes Parameter ConventionNOP/Ping, Reset, Sync, Checkpoint save/restore: no parameter byte. |
|||
001 ▾ |
Execute | 00001=Start · 00010=Stop · 00011=Pause · 00100=Resume · 00101=Abort · 00110=Complete · 00111=Retry · 01000=Fire/Actuate · 01001=Release · 01010=Lock · 01011=Unlock · 01100=Open · 01101=Close · 01110=Toggle · 01111=Cycle |
Most Execute codes take no parameter. Fire/Actuate may carry a 1-byte actuator target ID. |
Typical UsageExecute commands drive physical or logical state machines. Start/Stop/Pause/Resume are the standard lifecycle quartet. Abort and Retry are the error-path pair. Fire and Actuate address physical effectors. Parameter ConventionStandalone codes (Start, Stop, Pause, Resume, Abort, Complete, Retry): no parameter byte. |
|||
010 ▾ |
Query | 00001=Status · 00010=Health · 00011=Position · 00100=Velocity · 00101=Temperature · 00110=Pressure · 00111=Power · 01000=Fuel · 01001=Battery · 01010=Signal · 01011=Error count · 01100=Queue depth · 01101=Uptime · 01110=Version · 01111=Identity |
Query codes return data. Response carries a Category 1100 (class 000, code 00111 Status) command with parameter byte = result value, or a full Record when value requires Layer 2 precision. |
Query Response PatternQuery byte triggers a response. The response is a Category 1100 Status command with the queried value in the parameter byte (for 8-bit values) or a full BitPads Record for precision-sensitive measurements. Engineering QueriesPosition, Velocity, Temperature, Pressure, Power, Fuel, Battery, Signal — these map directly to Universal Domain physical quantities. The query code is more compact than a full Layer 3 request record for non-critical polling. |
|||
011 ▾ |
Configure | 00001=Set value · 00010=Set threshold · 00011=Set mode · 00100=Set rate · 00101=Set address · 00110=Set codebook · 00111=Set archetype · 01000=Enable · 01001=Disable · 01010=Set SF · 01011=Set D · 01100=Set timeout · 01101=Set priority · 01110=Set encoding · 01111=Set domain |
All Configure codes take exactly 1 parameter byte (the new setting value or index). |
Parameter ConventionEvery Configure code is a 2-byte total: command byte + parameter byte. Set SF: parameter is scaling factor index (0–127). Set D: parameter is decimal position. Set codebook: parameter is codebook index (0–255). Set archetype: parameter is 4-bit archetype code in lower nibble. Runtime Re-configurationConfigure commands allow in-session parameter updates at 2 bytes each — significantly cheaper than a new Category 1101 Context Declaration block when only one parameter changes. |
|||
100 ▾ |
Schedule | 00001=At time · 00010=After duration · 00011=At interval · 00100=On trigger · 00101=On threshold · 00110=On sequence complete · 00111=On error · 01000=Cancel schedule · 01001=Defer · 01010=Expedite · 01011=Set deadline |
At time / After duration / At interval: 1 parameter byte (time index or offset). On-event codes: 1 parameter byte (trigger ID or threshold index). |
Scheduling ModelSchedule commands defer execution. At time uses the session time tier to reference a timestamp. At interval repeats at the specified period. On-trigger and On-threshold register event-driven execution at the receiver — the executing side evaluates the condition. Parameter ConventionAt time: 1 byte (offset from session epoch, units per Layer 2 time tier). On trigger: 1 byte (trigger source ID, 0-255). Cancel schedule: no parameter. Defer/Expedite: 1 byte (relative priority shift). |
|||
101 ▾ |
Delegate | 00001=To node · 00010=Broadcast · 00011=Multicast · 00100=Return to originator · 00101=Proxy · 00110=Relay · 00111=Escalate |
To node: 1 parameter byte (target node ID, low byte of 32-bit sender ID space). Broadcast and Multicast: no parameter. Relay: 1 byte (relay hop count). |
Routing ModelDelegate commands redirect execution authority. To node targets a specific sub-entity within the session's sender ID space. Broadcast reaches all nodes in the session. Escalate passes authority up the hierarchy. Parameter ConventionTo node: 1 byte (node index within current network+system, per Layer 1 split mode). Proxy: 1 byte (proxy target index). Relay: 1 byte (TTL — decremented at each hop; discard at 0). |
|||
110 ▾ |
Conditional | 00001=If value GT · 00010=If value LT · 00011=If value EQ · 00100=If state equals · 00101=If error present · 00110=If connected · 00111=If timeout · 01000=If sequence complete |
All Conditional codes take 1 parameter byte (the threshold value, state code, or condition ID). The next command in the queue executes only if the condition evaluates true at the receiver. |
Conditional ChainingA Conditional command guards the next command in the queue. The receiver evaluates the condition; if false, the next command is skipped. Multiple conditionals may be chained — each guards the immediately following command only. Parameter ConventionIf value GT/LT/EQ: 1 byte (8-bit comparison value). If state equals: 1 byte (target state code). If error present: 1 byte (error class mask). If timeout: 1 byte (elapsed threshold in session time units). |
|||
111 |
Extended | Next byte = 8-bit extended command code. 256 additional commands per domain profile. Profile declares the full code table at session open. | Profile-dependent. Extended code byte itself may declare parameter presence in its upper bit. |
Command Sequence Examples
Three annotated sequences. Each begins with the Meta byte declaring Category 1100.
Example 1 — Session Checkpoint Save (no parameter)
Cat 1100
Code 00100
Example 2 — Status Request with Parameter (status type selector)
Cat 1100
Code 00111
Health type
Example 3 — Error Report (System Control, class 000 with error class parameter)
Cat 1100
Code 00111
Error class
Category 1101
Context Declaration
Category 1101 declares interpretation context for subsequent records. A single declaration block can activate the enhancement grammar, switch the active codebook, change domain, override the currency or quantity type, set a nesting level, or remap signal slots — all scoped to a precise activation window defined by the Scope Level byte.
The receiver reads the declaration and applies the context to all records within the declared scope. No re-declaration is needed unless the context changes again.
Block Structure
Cat 1101
byte
byte
parameters
Meta byte 1 = 0x1D when ACK bit and continuation bit are both 0 (Wave, category 1101). The ACK bit (bit 2) and continuation bit (bit 3) may be set for confirmed or fragmented declarations.
Declaration Types
| Type Byte | Name | Parameter(s) | Effect |
|---|---|---|---|
0x01 |
Compound Mode toggle | 1 byte: 0x01=enable, 0x00=disable |
Enables or disables compound record mode (1111 continuation marker) within the declared scope. Replaces the per-batch compound control removed in v2. |
0x02 |
Codebook declaration | 1 byte: codebook index (0–255) | Switches the active codebook for binary pictography and C0 enhancement interpretation. Both sender and receiver update simultaneously. |
0x03 |
Domain declaration | 1 byte: domain code (0x00=Financial, 0x01=Engineering, 0x02=Hybrid, 0x03=Custom) |
Switches the active domain for the declared scope. Custom domain requires additional extension byte with profile reference. |
0x04 |
Currency / QTC override | 1 byte: currency or quantity-type code (6-bit value, upper 2 bits reserved) | Overrides the Layer 2 currency or physical quantity type for the declared scope. Useful for mixed-denomination batches without re-opening Layer 2. |
0x05 |
Nesting level declaration | 1 byte: maximum nesting depth permitted in scope | Sets the parser stack depth limit for the declared scope. Receiver may NAK if requested depth exceeds hardware capacity. |
0x06 |
Signal slot map override | 1 byte: slot presence bitmap (P4–P8 in lower 5 bits) | Overrides the default signal slot map for the declared scope. Records in scope inherit the declared slot configuration without a per-record Signal Slot Presence byte. |
0x07–0xFF |
User-defined | Profile-dependent | Reserved for application-layer and deployment-specific declarations. The session profile declares valid type codes and their parameter formats at session open. |
Context Declaration — Scope Control
Activation Scope Levels
The Scope Level byte in a Category 1101 block controls precisely how far the declared context extends. Fine-grained scope control eliminates the need to re-declare context at every record boundary.
Five primary scope levels cover inline-to-session range. Scope level 0 is the surgical instrument — exactly one byte or token. Scope level 4 applies to the entire remaining session and requires no further maintenance overhead.
| Level | Code | Scope Boundary | Example Use |
|---|---|---|---|
| 0 — Inline | 0x00 |
Applies to the next byte or token only. After that byte, the prior context resumes. | Single-byte codebook override: one pictogram in an alternate codebook without shifting the whole stream. |
| 1 — Record | 0x01 |
Applies to the next complete record (from Meta byte 1 to final component). Reverts on record close. | Currency override for a single cross-currency record within a USD batch — that one record uses EUR, all others remain USD. |
| 2 — Batch | 0x02 |
Applies until the next Layer 2 batch-close (ETB or EOT). All records in the batch inherit the context. | Compound mode enable for one batch of compound records, followed by disable for the next batch. The v2 compound toggle workaround (see Compound Toggle section). |
| 3 — Category | 0x03 |
Applies to all records of the same BitPads category for the remainder of the session, or until a new category-scope declaration supersedes it. | Declaring that all Category 0100 (Basic Record) transmissions in this session use Engineering domain archetype 0x07 (Source-Sink) without per-record annotation. |
| 4 — Session | 0x04 |
Applies to the entire remaining session. Cannot be reversed without a new session. Requires Layer 1 re-confirmation via ACK before taking effect globally. | Switching the entire session from Financial to Engineering domain mid-session after a mode-change command from the control station. Requires ACK handshake. |
Scope compounding: Scope levels can be layered. A session-scope codebook declaration sets the base. A batch-scope codebook override applies only within that batch and reverts on batch close. The receiver maintains a scope stack matching the parser stack. The most recently declared scope for a given field takes precedence.
Context Declaration — Practical Application
Compound Mode Toggle via Category 1101
BitPads v2.0 removed the per-batch compound control byte from Layer 2 in favour of a session-level compound flag. The architectural rationale was cleaner defaults and zero per-batch overhead when compound mode is always on or always off. The tradeoff: selective compound activation now requires a Category 1101 declaration.
The 3-Byte Toggle Sequence
To enable or disable compound mode for a specific batch, the sender transmits a Category 1101 Context Declaration with Declaration Type 0x01 (Compound Mode) and Scope Level 0x02 (Batch scope), followed by a parameter byte.
Tradeoff Comparison — v1 vs v2
| Scenario | v1 Approach (per-batch BL ctrl) | v2 Approach (session flag + 1101 toggle) | Winner |
|---|---|---|---|
| Compound always on across session | 1 byte per batch (repeated overhead) | 1 bit in Layer 1 (session flag, paid once) | v2 |
| Compound never used in session | 1 byte per batch (overhead even when off) | 0 bytes (flag absent = disabled) | v2 |
| Compound on for some batches, off for others | 1 byte per batch (simple flag flip) | 4 bytes per toggle (full declaration block) | v1 |
| Emergency compound toggle mid-session | 1 byte available at any batch boundary | 4-byte Category 1101 sequence required | v1 |
Design consequence: Applications that selectively enable compound mode for specific batches pay a 4-byte overhead per toggle in v2 rather than 1 byte in v1. The v2 design prioritises the common cases (always on, always off) at the expense of the mixed case. Applications with frequent selective compound activation should declare compound mode at session level and manage the 1111 marker discipline in the application layer.
Context Declaration — Update Grammar
Parameter Update Grammar
Subsequent Context Declarations can update only changed fields without re-declaring the entire context. The update mechanism uses the Declaration Type byte with its update flag (upper bit of the type nibble set) to signal that only the specified fields are changing — all other previously declared context values remain in effect.
Full Declaration vs Update Declaration
Full Declaration
- Declares a complete context specification
- All fields for the declaration type are set
- Prior context for those fields is replaced
- Type byte upper nibble: declaration type only
- Used at scope open or after a full context change
Update Declaration
- Changes only the specified fields
- Unmentioned fields remain at declared values
- Type byte upper bit set (update flag)
- Used mid-scope to make partial changes
- Cheaper than re-issuing full declaration
Worked Example — Session-Scope USD, Then EUR Override for One Batch
Step 1 — Session-open: Declare USD with D=2 for entire session
Meta byte 1 (Cat 1101) + Type 0x04 (Currency/QTC override) + Scope 0x04 (Session scope) + Parameter 0x01 (USD currency index)
Effect: All records in the session decode value blocks as USD with 2 decimal places. No per-record currency annotation needed.
Step 2 — Before a specific batch: Update to EUR for batch scope only
Meta byte 1 (Cat 1101) + Type 0x84 (Update flag set, Currency/QTC override) + Scope 0x02 (Batch scope) + Parameter 0x02 (EUR currency index)
Effect: Records in this batch decode as EUR. The session-scope USD declaration is not touched — it waits beneath the batch-scope override. On batch close, currency reverts to USD automatically.
Step 3 — Batch closes: session context resumes
No declaration needed. When the batch closes (ETB or EOT), the batch-scope EUR override expires. The session-scope USD declaration re-asserts. Subsequent records resume USD decoding with zero additional bytes.
Extended Examples
Command & Context Sequences
Three extended sequences showing Categories 1100 and 1101 working together with Layer 1, Layer 2, and signal slots.
Sequence 1 — Session Open with Domain Context
A full session open followed by an Engineering domain context declaration at session scope, then Layer 2 batch header.
Sequence 2 — Mid-Session Batch Scope Compound Toggle
Compound mode is off by default. A batch of compound records is bracketed by Category 1101 enable/disable declarations. Three compound records follow, each linked by the 1111 continuation marker.
Sequence 3 — Status Query and Response
Sender issues a Query command (Category 1100, class 010, code 00001 = Status). Receiver responds with a Category 1100 System Control Status reply carrying the status value in the parameter byte.