update to rmmi
This commit is contained in:
parent
99930c1b3d
commit
3372860038
1
.gitignore
vendored
1
.gitignore
vendored
@ -24,3 +24,4 @@ CMakeCache.txt
|
||||
|
||||
*.tox
|
||||
imgui.ini
|
||||
config.json
|
||||
|
@ -33,7 +33,7 @@ SOLANA_PLUGIN_EXPORT uint32_t solana_plugin_start(struct SolanaAPI* solana_api)
|
||||
|
||||
try {
|
||||
auto* cr = PLUG_RESOLVE_INSTANCE_VERSIONED(Contact3Registry, "1");
|
||||
auto* rmm = PLUG_RESOLVE_INSTANCE(RegistryMessageModel);
|
||||
auto* rmm = PLUG_RESOLVE_INSTANCE(RegistryMessageModelI);
|
||||
auto* conf = PLUG_RESOLVE_INSTANCE(ConfigModelI);
|
||||
|
||||
// static store, could be anywhere tho
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <iostream>
|
||||
|
||||
struct Automatic1111_v1_Endpoint : public SDBot::EndpointI {
|
||||
Automatic1111_v1_Endpoint(RegistryMessageModel& rmm, std::default_random_engine& rng) : SDBot::EndpointI(rmm, rng) {}
|
||||
Automatic1111_v1_Endpoint(RegistryMessageModelI& rmm, std::default_random_engine& rng) : SDBot::EndpointI(rmm, rng) {}
|
||||
|
||||
bool handleResponse(Contact3 contact, ByteSpan data) override {
|
||||
//std::cout << std::string_view{reinterpret_cast<const char*>(data.ptr), data.size} << "\n";
|
||||
@ -61,7 +61,7 @@ struct Automatic1111_v1_Endpoint : public SDBot::EndpointI {
|
||||
};
|
||||
|
||||
struct SDcpp_wip1_Endpoint : public SDBot::EndpointI {
|
||||
SDcpp_wip1_Endpoint(RegistryMessageModel& rmm, std::default_random_engine& rng) : SDBot::EndpointI(rmm, rng) {}
|
||||
SDcpp_wip1_Endpoint(RegistryMessageModelI& rmm, std::default_random_engine& rng) : SDBot::EndpointI(rmm, rng) {}
|
||||
|
||||
bool handleResponse(Contact3 contact, ByteSpan data) override {
|
||||
//std::cout << std::string_view{reinterpret_cast<const char*>(data.ptr), data.size} << "\n";
|
||||
@ -131,7 +131,7 @@ struct SDcpp_wip1_Endpoint : public SDBot::EndpointI {
|
||||
|
||||
SDBot::SDBot(
|
||||
Contact3Registry& cr,
|
||||
RegistryMessageModel& rmm,
|
||||
RegistryMessageModelI& rmm,
|
||||
ConfigModelI& conf
|
||||
) : _cr(cr), _rmm(rmm), _conf(conf) {
|
||||
_rng.seed(std::random_device{}());
|
||||
|
@ -20,7 +20,7 @@ struct ConfigModelI;
|
||||
|
||||
class SDBot : public RegistryMessageModelEventI {
|
||||
Contact3Registry& _cr;
|
||||
RegistryMessageModel& _rmm;
|
||||
RegistryMessageModelI& _rmm;
|
||||
ConfigModelI& _conf;
|
||||
|
||||
//TransferManager& _tm;
|
||||
@ -38,9 +38,9 @@ class SDBot : public RegistryMessageModelEventI {
|
||||
|
||||
public:
|
||||
struct EndpointI {
|
||||
RegistryMessageModel& _rmm;
|
||||
RegistryMessageModelI& _rmm;
|
||||
std::default_random_engine& _rng;
|
||||
EndpointI(RegistryMessageModel& rmm, std::default_random_engine& rng) : _rmm(rmm), _rng(rng) {}
|
||||
EndpointI(RegistryMessageModelI& rmm, std::default_random_engine& rng) : _rmm(rmm), _rng(rng) {}
|
||||
virtual ~EndpointI(void) {}
|
||||
|
||||
virtual bool handleResponse(Contact3 contact, ByteSpan data) = 0;
|
||||
@ -52,7 +52,7 @@ class SDBot : public RegistryMessageModelEventI {
|
||||
public:
|
||||
SDBot(
|
||||
Contact3Registry& cr,
|
||||
RegistryMessageModel& rmm,
|
||||
RegistryMessageModelI& rmm,
|
||||
ConfigModelI& conf
|
||||
);
|
||||
~SDBot(void);
|
||||
|
Loading…
Reference in New Issue
Block a user