Versions in this module Expand all Collapse all v0 v0.3.0 May 31, 2021 Changes in this version + func CheckConfig() (bool, error) + func CurrentISOtime() string + func Deepdeserialize(str string) map[string]string + func FormatLog(log Log) string + func GenerateConfig() error + func GenerateSensorValue(sensorvalue string, sensortype string, meshorchestrator *MeshOrchestrator, ...) float64 + func LogHandler(meshorchestrator *MeshOrchestrator) + func NewFirestoreClient() (*firestore.Client, error) + func PingHandler(meshorchestrator *MeshOrchestrator) + func WriteConfig(config Config) error + type CloudInterface struct + FirestoreClient firestore.Client + MeshDoc firestore.DocumentRef + PingCollection firestore.CollectionRef + func NewCloudInterface(meshid string) (*CloudInterface, error) + type Config struct + DeviceID string + DeviceType string + SchedulerPingRate int + Services map[string]ServiceConfig + func ReadConfig() (Config, error) + type ControlNode struct + Connectpin int + MeshPORT int + MeshPSWD string + MeshSSID string + NodeID int64 + Pinger bool + Pingerpin int + SerialBaud int + func NewControlNode(log Log) (*ControlNode, error) + type Credentials struct + Password string + Username string + type FireEventSimulator struct + SimulationOn bool + SimulationSeeds map[string]*SimulatorSeed + func NewFireEventSimulator() *FireEventSimulator + func (simulator *FireEventSimulator) GetSimulatedValue(sensortype string) float64 + func (simulator *FireEventSimulator) StartFireEvent(logqueue chan Log) + type Log interface + GetLogmessage func() string + GetLogmetadata func() map[string]string + GetLogsource func() string + GetLogtime func() string + GetLogtype func() string + type MeshConfiguration struct + Meshport int + Meshpswd string + Meshssid string + type MeshDocument struct + ControllerID string + ControlnodeConfig ControlNode + ControlnodeID string + Credentials Credentials + MeshConfiguration MeshConfiguration + NodeIDlist []int64 + Nodelist map[string]SensorNode + func NewMeshDocument(meshorchestrator *MeshOrchestrator) *MeshDocument + func (meshdoc *MeshDocument) Push(cloudinterface *CloudInterface) error + type MeshOrchestrator struct + Accumulation map[string]MeshPing + AccumulatorQueue chan SensorPing + Cloudinterface CloudInterface + CommandQueue chan map[string]string + ControllerID string + Controlnode ControlNode + LogQueue chan Log + MeshConnected bool + MeshDoc MeshDocument + NodeIDlist []int64 + Nodelist map[int64]SensorNode + ObserverQueue chan ObserverLog + SchedulerOn bool + Simulator FireEventSimulator + func NewMeshOrchestrator() (*MeshOrchestrator, error) + func (meshorchestrator *MeshOrchestrator) Close() + func (meshorchestrator *MeshOrchestrator) Flush() + func (meshorchestrator *MeshOrchestrator) GetSimpleNodeList() map[int64]string + func (meshorchestrator *MeshOrchestrator) Initialize() + func (meshorchestrator *MeshOrchestrator) SetControlnode(log Log) error + func (meshorchestrator *MeshOrchestrator) SetNode(log Log) error + func (meshorchestrator *MeshOrchestrator) SetNodeIDlist(log Log) error + func (meshorchestrator *MeshOrchestrator) SetSensorData(log Log) error + func (meshorchestrator *MeshOrchestrator) UpdateNodeIDlist() + func (meshorchestrator *MeshOrchestrator) UpdateNodelist() + type MeshPing struct + Nodelist []int64 + PingID string + Pings map[int64]SensorPing + Pingtime string + func NewMeshPing(pingid string, pingtime string, nodelist []int64) *MeshPing + func (meshping *MeshPing) AddPing(sensorping SensorPing, meshorchestrator *MeshOrchestrator) + func (meshping *MeshPing) Complete() bool + func (meshping *MeshPing) Flush(meshorchestrator *MeshOrchestrator) error + func (meshping *MeshPing) GenerateAvgProbability() float64 + func (meshping *MeshPing) GenerateProbabilitydatamap() map[string]float64 + func (meshping *MeshPing) GenerateSensordatamap() map[string]map[string]float64 + type ObserverLog struct + Logmessage string + Logsource string + Logtype string + func NewObserverLog(log Log) *ObserverLog + type OrchLog struct + Logmessage string + Logmetadata map[string]string + Logsource string + Logtime string + Logtype string + func NewObsCommand(command string) *OrchLog + func NewOrchCloudlog(message string) *OrchLog + func NewOrchProtolog(message string, server string, service string, err error) *OrchLog + func NewOrchSchedlog(message string) *OrchLog + func NewOrchServerlog(message string) *OrchLog + func (orchlog *OrchLog) GetLogmessage() string + func (orchlog *OrchLog) GetLogmetadata() map[string]string + func (orchlog *OrchLog) GetLogsource() string + func (orchlog *OrchLog) GetLogtime() string + func (orchlog *OrchLog) GetLogtype() string + type PingDocument struct + AvgProbability float64 + Nodelist []int64 + PingID string + Pingtime string + Probabilitydata map[string]float64 + Sensordata map[string]map[string]float64 + func NewPingDocument(meshping *MeshPing) *PingDocument + func (pingdoc *PingDocument) Push(cloudinterface *CloudInterface) error + type SensorNode struct + Connectpin int + DHTpin int + DHTtype int + FLMpin int + FLMtype int + GASpin int + GAStype int + NodeID int64 + Pinger bool + Pingerpin int + SerialBaud int + func NewSensorNode(log Log) (*SensorNode, error) + func (sensornode *SensorNode) GetConfigString() string + type SensorPing struct + Fireprobability float64 + PingID string + Pingtime string + Sensordata map[string]float64 + Sensornode SensorNode + func NewSensorPing(log Log, meshorchestrator *MeshOrchestrator) (*SensorPing, error) + func (sensorping *SensorPing) CalculateFireProbability() error + func (sensorping *SensorPing) GenerateSensorData(sensordata map[string]string, meshorchestrator *MeshOrchestrator) + type ServiceConfig struct + Host string + Port int + type SimulatorSeed struct + Adjust float64 + Cursor float64 + Curve string + Initial float64 + Peak float64 + Width float64 + func NewSimulatorSeed(initial, peak, adjust, width float64, curve string) *SimulatorSeed + func (seed *SimulatorSeed) StartCurve(wg *sync.WaitGroup) v0.2.0 May 16, 2021