Make Invalid default for not implemented functionality
This commit is contained in:
parent
f458187095
commit
bca8a347ff
1 changed files with 14 additions and 20 deletions
|
@ -78,7 +78,7 @@ auto message::parser::StateVisitor::operator()(state::MessageLightData)
|
||||||
return state::Invalid{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
|
|
||||||
return state::Complete{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
auto message::parser::StateVisitor::operator()(state::MessageInfo) -> State {
|
auto message::parser::StateVisitor::operator()(state::MessageInfo) -> State {
|
||||||
if (!stream.available<char>()) {
|
if (!stream.available<char>()) {
|
||||||
|
@ -92,7 +92,7 @@ auto message::parser::StateVisitor::operator()(state::MessageInfo) -> State {
|
||||||
return state::Invalid{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
|
|
||||||
return state::Complete{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
auto message::parser::StateVisitor::operator()(state::MessageWarning) -> State {
|
auto message::parser::StateVisitor::operator()(state::MessageWarning) -> State {
|
||||||
if (!stream.available<char>()) {
|
if (!stream.available<char>()) {
|
||||||
|
@ -106,7 +106,7 @@ auto message::parser::StateVisitor::operator()(state::MessageWarning) -> State {
|
||||||
return state::Invalid{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
|
|
||||||
return state::Complete{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
auto message::parser::StateVisitor::operator()(state::MessageError) -> State {
|
auto message::parser::StateVisitor::operator()(state::MessageError) -> State {
|
||||||
if (!stream.available<char>()) {
|
if (!stream.available<char>()) {
|
||||||
|
@ -120,7 +120,7 @@ auto message::parser::StateVisitor::operator()(state::MessageError) -> State {
|
||||||
return state::Invalid{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
|
|
||||||
return state::Complete{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
auto message::parser::StateVisitor::operator()(state::MessageSuccess) -> State {
|
auto message::parser::StateVisitor::operator()(state::MessageSuccess) -> State {
|
||||||
if (!stream.available<char>()) {
|
if (!stream.available<char>()) {
|
||||||
|
@ -134,7 +134,7 @@ auto message::parser::StateVisitor::operator()(state::MessageSuccess) -> State {
|
||||||
return state::Invalid{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
|
|
||||||
return state::Complete{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
|
|
||||||
auto message::parser::StateVisitor::operator()(state::Settings) -> State {
|
auto message::parser::StateVisitor::operator()(state::Settings) -> State {
|
||||||
|
@ -175,7 +175,7 @@ auto message::parser::StateVisitor::operator()(state::SettingsSetBaud)
|
||||||
return state::Invalid{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
|
|
||||||
return state::Complete{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
auto message::parser::StateVisitor::operator()(state::SettingsWifiPassword)
|
auto message::parser::StateVisitor::operator()(state::SettingsWifiPassword)
|
||||||
-> State {
|
-> State {
|
||||||
|
@ -190,7 +190,7 @@ auto message::parser::StateVisitor::operator()(state::SettingsWifiPassword)
|
||||||
return state::Invalid{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
|
|
||||||
return state::Complete{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
auto message::parser::StateVisitor::operator()(state::SettingsWifiSSID)
|
auto message::parser::StateVisitor::operator()(state::SettingsWifiSSID)
|
||||||
-> State {
|
-> State {
|
||||||
|
@ -205,7 +205,7 @@ auto message::parser::StateVisitor::operator()(state::SettingsWifiSSID)
|
||||||
return state::Invalid{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
|
|
||||||
return state::Complete{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
|
|
||||||
auto message::parser::StateVisitor::operator()(state::LightControl) -> State {
|
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)
|
auto message::parser::StateVisitor::operator()(state::CommandRequestLightData)
|
||||||
-> State {
|
-> State {
|
||||||
|
return state::Invalid{};
|
||||||
return state::Complete{};
|
|
||||||
}
|
}
|
||||||
auto message::parser::StateVisitor::operator()(
|
auto message::parser::StateVisitor::operator()(
|
||||||
state::CommandEnterConsoleFlashing) -> State {
|
state::CommandEnterConsoleFlashing) -> State {
|
||||||
|
@ -352,8 +351,7 @@ auto message::parser::StateVisitor::operator()(
|
||||||
// invalidCallback("CommandEnterConsoleFlashing: Too many bytes left");
|
// invalidCallback("CommandEnterConsoleFlashing: Too many bytes left");
|
||||||
return state::Invalid{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
|
return state::Invalid{};
|
||||||
return state::Complete{};
|
|
||||||
}
|
}
|
||||||
auto message::parser::StateVisitor::operator()(
|
auto message::parser::StateVisitor::operator()(
|
||||||
state::CommandExitConsoleFlashing) -> State {
|
state::CommandExitConsoleFlashing) -> State {
|
||||||
|
@ -361,8 +359,7 @@ auto message::parser::StateVisitor::operator()(
|
||||||
// invalidCallback("CommandExitConsoleFlashing: Too many bytes left");
|
// invalidCallback("CommandExitConsoleFlashing: Too many bytes left");
|
||||||
return state::Invalid{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
|
return state::Invalid{};
|
||||||
return state::Complete{};
|
|
||||||
}
|
}
|
||||||
auto message::parser::StateVisitor::operator()(state::CommandPairBluetooth)
|
auto message::parser::StateVisitor::operator()(state::CommandPairBluetooth)
|
||||||
-> State {
|
-> State {
|
||||||
|
@ -370,24 +367,21 @@ auto message::parser::StateVisitor::operator()(state::CommandPairBluetooth)
|
||||||
// invalidCallback("CommandPairBluetooth: Too many bytes left");
|
// invalidCallback("CommandPairBluetooth: Too many bytes left");
|
||||||
return state::Invalid{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
|
return state::Invalid{};
|
||||||
return state::Complete{};
|
|
||||||
}
|
}
|
||||||
auto message::parser::StateVisitor::operator()(state::CommandHelp) -> State {
|
auto message::parser::StateVisitor::operator()(state::CommandHelp) -> State {
|
||||||
if (stream.available_bytes() > 0) {
|
if (stream.available_bytes() > 0) {
|
||||||
// invalidCallback("CommandHelp: Too many bytes left");
|
// invalidCallback("CommandHelp: Too many bytes left");
|
||||||
return state::Invalid{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
|
return state::Invalid{};
|
||||||
return state::Complete{};
|
|
||||||
}
|
}
|
||||||
auto message::parser::StateVisitor::operator()(state::CommandVersion) -> State {
|
auto message::parser::StateVisitor::operator()(state::CommandVersion) -> State {
|
||||||
if (stream.available_bytes() > 0) {
|
if (stream.available_bytes() > 0) {
|
||||||
// invalidCallback("CommandVersion: Too many bytes left");
|
// invalidCallback("CommandVersion: Too many bytes left");
|
||||||
return state::Invalid{};
|
return state::Invalid{};
|
||||||
}
|
}
|
||||||
|
return state::Invalid{};
|
||||||
return state::Complete{};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto message::parser::StateVisitor::operator()(state::CommandReset) -> State {
|
auto message::parser::StateVisitor::operator()(state::CommandReset) -> State {
|
||||||
|
|
Reference in a new issue