Return to Home Page

Configuration Status Writer

This writer forms part of the Configuration request/response cycle.

sequenceDiagram participant Pi participant Pico Pi->>Pico: PiToPico.ConfigStatusRequest Pico->>Pi: PicoToPi.ConfigStatusResponse Pi->>Pico: PiToPico.ConfigPush

It implements the writer that allows the Pico to emit PiToPico.ConfigStatusResponse IBus messages.

Source

The source code for this observer is pretty straight-forward:

    void ConfigurationStatusWriter::scheduleEmit(messages::ConfigMessage configMessage) {
        this->schedulePicoToPiMessageForWrite(messages::PicoToPiMessage{
                .messageType = messages::PicoToPiMessage::MessageType::ConfigStatusResponse,
                .existingConfig = configMessage
        });
}

The main trick behind all this config machinery is that the Protobuf format is stored in Flash, so there isn’t a lot of logic to serialize/deseralize it.

Return to Top