Documentation ¶
Index ¶
Constants ¶
View Source
const ( // The file that contains the authorization for the client, signed by // the GCA. AuthorizationFile = "authorization.dat" // The file that contains the keypair for the client, authorized by the GCA. ClientKeyFile = "clientKeys.dat" // The file that contains the public key of the GCA. GCAPubKeyFile = "gcaPubKey.dat" // GCAServerMapFile contains the list of servers that the GCA has online. It // will also contain banned servers. GCAServerMapFile = "gcaServers.dat" // HistoryFile contains all of the historic power readings for this solar // installation. HistoryFile = "history.dat" // ShortIDFile contains the ShortID of the device, which is useful for // compressing communications with the GCA servers. ShortIDFile = "shortID.dat" )
View Source
const ( // EnergyFile is the file used by the monitoring equipment to write the total // amount of energy that was measured in each timeslot. EnergyFile = "/opt/halki/energy_data.csv" // CTMultiplier is the multiplier that we use on the current // transformer to correctly normalize the readings from the current // transformer. EnergyMultiplier = 2000 // UDPSleepSyncTime sets the amount of time that the system sleeps // between each UDP packet that gets sent. We sleep between packets // because the cell network can only handle at points less than 1 kbps // of traffic, and sending a ton of packets all at once during a sync // operation is all but guaranteed to get them dropped. UDPSleepSyncTime = time.Second )
Variables ¶
This section is empty.
Functions ¶
func SerializeGCAServerMap ¶
This is a function for creating the server map and saving it to disk.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
The stateful object for the client.
type EnergyRecord ¶
Represents one row of data from the energy file.
Click to show internal directories.
Click to hide internal directories.