saveRDSCustom <- function(obj,fileName){
tryCatch({
fileConn<-file(fileName,blocking = TRUE)
saveRDS(obj,fileConn)
close(fileConn)
return(TRUE)
}
,error=function(e){
cat(e)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"t":1479255000,"c":0} | |
c is a number | |
convert it to binary | |
5bit are used | |
1st bit : unused , always 0 | |
2nd bit : configured | |
3rd bit : discovered | |
4th bit : connected | |
5th bit : recieved |
WINDOW is # of batches to be used
#define WINDOW = 24 //for 4 hours double n,m1,m2,m3,m4 //mN is Nth moment
function reset(){ n=0 m1=0 m2=0
shell access of RPI
cd ~/prophecy-gateway/src/public/js
edit function.js line 66
redis-cli
> flushall ( inside redis console)
[
["Custom.*", "Blower",
["Blower Vibration CUSTOM"]
],
["VPDB.*", "Blower",
["Blower Vibration VPDB","Filter Status VPDB", "Oil Check VPDB", "Oil Overfill Indicator VPDB", "Belt Tension VPDB"]
],
["SVP.*", "Blower",
["Blower Vibration SVP","Filter Status SVP", "Oil Check SVP", "Oil Overfill Indicator SVP", "Belt Tension SVP"]
color description appropriate_reason
white machine stationary Machine is idle
white batch rejected Poor quality of data
white autobaseline input missing in json Baseline pending
black non-autobaseline input missing in json Unexpected Error
black R code failure,exception etc Unexpected Error
black batch missing Link Error
R algo will require multiple algos for a particular gauge based on model information. Also there is a frequent change in input structure of input.
To handle these things a unified json will be provided which will have following #####1) header containing machine details ( model, name, company, zone etc ) #####2) All the available statistics for all the collectors of all the subassemblies of a machines. #####3) raw data in 2d array format under collector
This will be the only input everything else will be sourced statically.
NewerOlder