Make Invalid default for not implemented functionality

This commit is contained in:
GHOSCHT 2023-03-30 19:55:46 +02:00
parent f458187095
commit bca8a347ff
No known key found for this signature in database

View file

@ -78,7 +78,7 @@ auto message::parser::StateVisitor::operator()(state::MessageLightData)
return state::Invalid{};
}
return state::Complete{};
return state::Invalid{};
}
auto message::parser::StateVisitor::operator()(state::MessageInfo) -> State {
if (!stream.available<char>()) {
@ -92,7 +92,7 @@ auto message::parser::StateVisitor::operator()(state::MessageInfo) -> State {
return state::Invalid{};
}
return state::Complete{};
return state::Invalid{};
}
auto message::parser::StateVisitor::operator()(state::MessageWarning) -> State {
if (!stream.available<char>()) {
@ -106,7 +106,7 @@ auto message::parser::StateVisitor::operator()(state::MessageWarning) -> State {
return state::Invalid{};
}
return state::Complete{};
return state::Invalid{};
}
auto message::parser::StateVisitor::operator()(state::MessageError) -> State {
if (!stream.available<char>()) {
@ -120,7 +120,7 @@ auto message::parser::StateVisitor::operator()(state::MessageError) -> State {
return state::Invalid{};
}
return state::Complete{};
return state::Invalid{};
}
auto message::parser::StateVisitor::operator()(state::MessageSuccess) -> State {
if (!stream.available<char>()) {
@ -134,7 +134,7 @@ auto message::parser::StateVisitor::operator()(state::MessageSuccess) -> State {
return state::Invalid{};
}
return state::Complete{};
return state::Invalid{};
}
auto message::parser::StateVisitor::operator()(state::Settings) -> State {
@ -175,7 +175,7 @@ auto message::parser::StateVisitor::operator()(state::SettingsSetBaud)
return state::Invalid{};
}
return state::Complete{};
return state::Invalid{};
}
auto message::parser::StateVisitor::operator()(state::SettingsWifiPassword)
-> State {
@ -190,7 +190,7 @@ auto message::parser::StateVisitor::operator()(state::SettingsWifiPassword)
return state::Invalid{};
}
return state::Complete{};
return state::Invalid{};
}
auto message::parser::StateVisitor::operator()(state::SettingsWifiSSID)
-> State {
@ -205,7 +205,7 @@ auto message::parser::StateVisitor::operator()(state::SettingsWifiSSID)
return state::Invalid{};
}
return state::Complete{};
return state::Invalid{};
}
auto message::parser::StateVisitor::operator()(state::LightControl) -> State {
@ -343,8 +343,7 @@ auto message::parser::StateVisitor::operator()(state::Command) -> State {
}
auto message::parser::StateVisitor::operator()(state::CommandRequestLightData)
-> State {
return state::Complete{};
return state::Invalid{};
}
auto message::parser::StateVisitor::operator()(
state::CommandEnterConsoleFlashing) -> State {
@ -352,8 +351,7 @@ auto message::parser::StateVisitor::operator()(
// invalidCallback("CommandEnterConsoleFlashing: Too many bytes left");
return state::Invalid{};
}
return state::Complete{};
return state::Invalid{};
}
auto message::parser::StateVisitor::operator()(
state::CommandExitConsoleFlashing) -> State {
@ -361,8 +359,7 @@ auto message::parser::StateVisitor::operator()(
// invalidCallback("CommandExitConsoleFlashing: Too many bytes left");
return state::Invalid{};
}
return state::Complete{};
return state::Invalid{};
}
auto message::parser::StateVisitor::operator()(state::CommandPairBluetooth)
-> State {
@ -370,24 +367,21 @@ auto message::parser::StateVisitor::operator()(state::CommandPairBluetooth)
// invalidCallback("CommandPairBluetooth: Too many bytes left");
return state::Invalid{};
}
return state::Complete{};
return state::Invalid{};
}
auto message::parser::StateVisitor::operator()(state::CommandHelp) -> State {
if (stream.available_bytes() > 0) {
// invalidCallback("CommandHelp: Too many bytes left");
return state::Invalid{};
}
return state::Complete{};
return state::Invalid{};
}
auto message::parser::StateVisitor::operator()(state::CommandVersion) -> State {
if (stream.available_bytes() > 0) {
// invalidCallback("CommandVersion: Too many bytes left");
return state::Invalid{};
}
return state::Complete{};
return state::Invalid{};
}
auto message::parser::StateVisitor::operator()(state::CommandReset) -> State {