我有一个界面" Hadoop
" (在Gik.Interface.dll中)
实现IBigData接口的两个类:
Azure
(在Gik.Data.Hadoop.dll程序集中)
<ImplementedAssembly>
<Assembly>Gik.Data.Hadoop.dll</Assembly>
<Assembly>Gik.Data.Aws.dll</Assembly>
<Assembly>Gik.Data.Azure.dll</Assembly>
</ImplementedAssembly>
(在Gik.Data.Azure.dll程序集中)
我们有一个主类(在Gik.Processor.dll程序集中),它包含switch case,它定义何时执行哪个实现。
问题:
每当我们有新的实现时,我们都必须更新我们的主类开关案例。
可以通过app.config / web.config文件完成吗?
void loop(){
uint8_t sMsg[512];
gestures data;
char *msg = "aaaaaaaaaaaaaaaaaaaaaaaaa";
strcpy(data.values,msg);
Serial.println("done with strcpy");
pb_ostream_t buffer = pb_ostream_from_buffer(sMsg, sizeof(sMsg));
if (!(pb_encode(&buffer, gestures_fields, &data))) {
Serial.println(F("Encoding failed"));
Serial.println(PB_GET_ERROR(&buffer));
return;
}
else
{
Serial.println("enterd else");
Serial.println((char*)sMsg);
client.run();
if (client.connected()) {
Serial.println("connected");
String payload = "{\"DeviceId\":\"" + String(DEVICE_ID) + "\", \"data\":" + (char*)sMsg + "}";
Serial.println(payload);
client.sendEvent(payload);
Serial.println("Published message!");
}
}
Serial.println("Done with loop");
}