Documentation ¶
Index ¶
- Variables
- func CalcAvailabilityAndPLF(in toolkit.M) (res toolkit.M)
- func CheckEnergyComparison(newdata toolkit.Ms, key1 string, key2 string) toolkit.Ms
- func CreateResult(success bool, data interface{}, message string) map[string]interface{}
- func CreateResultWithoutSession(success bool, data interface{}, message string) map[string]interface{}
- func CreateResultX(success bool, data interface{}, message string, r *knot.WebContext) map[string]interface{}
- func EnergyMeasurement(data interface{}, key1 string, key2 string) toolkit.Ms
- func GetAlarmTagsList() (result toolkit.M, e error)
- func GetAvailAndPLF(totalTurbine float64, okTime float64, energy float64, machineDownTime float64, ...) (machineAvail float64, gridAvail float64, dataAvail float64, totalAvail float64, ...)
- func GetDataDateAvailable(collectionName string, timestampColumn string, where *dbox.Filter) (min time.Time, max time.Time, err error)
- func GetDayInYear(year int) toolkit.M
- func GetDurationInMonth(tStart time.Time, tEnd time.Time) (int, []interface{}, toolkit.M)
- func GetHFDFolder() string
- func GetHourValue(tStart time.Time, tEnd time.Time, minDate time.Time, maxDate time.Time) (hourValue float64)
- func GetProjectList() (result []md.ProjectOut, e error)
- func GetProjectTurbineList(projects []interface{}) (result map[string]toolkit.M, sortedKey []string, e error)
- func GetStartEndDate(r *knot.WebContext, period string, tStart, tEnd time.Time) (startDate, endDate time.Time, err error)
- func GetStateList(projlist []md.ProjectOut) (result []string, e error)
- func GetTemperatureList() (result toolkit.M, e error)
- func GetTurbineList(projects []interface{}) (result []md.TurbineOut, e error)
- func GetTurbineNameList(project string) (turbineName map[string]string, err error)
- func HandleError(err error, optionalArgs ...interface{}) bool
- func HelperSetDb(conn dbox.IConnection)
- func ImageUploadHandler(r *knot.WebContext, filename, dstpath string) (error, string)
- func UploadFileHandler(r *knot.WebContext, tempfile, dstpath, filename string) (error, string, string, string)
- func UploadHandler(r *knot.WebContext, filename, dstpath string) (error, string)
- type Filter
- type FilterJS
- type Payloads
- type PayloadsDB
- type Sorting
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DebugMode bool DownTypes = []toolkit.M{ {"down": "aebok", "label": "AEBok"}, {"down": "externalstop", "label": "External Stop"}, {"down": "griddown", "label": "Grid Down"}, {"down": "internalgrid", "label": "Internal Grid"}, {"down": "machinedown", "label": "Machine Down"}, {"down": "unknown", "label": "Unknown"}, {"down": "weatherstop", "label": "Weather Stop"}, } WC *knot.WebContext )
Functions ¶
func CalcAvailabilityAndPLF ¶
============================= Revision Of GetAvailAndPLF @asp:20170725 =============================
Input : noofturbine, oktime, energy, counttimestamp, totalhour, totalcapacity, machinedowntime, griddowntime, otherdowntime counttimestamp -> count total data that available (*every data in 10 mins conv) oktime, totalhour -> in hour machinedowntime, griddowntime, otherdowntime -> in hour totalcapacity -> in MWatt energy -> in MWh Output : totalavailability, plf, machineavailability, gridavailability, dataavailability
=============================
func CheckEnergyComparison ¶
func CreateResult ¶
func CreateResultX ¶
func EnergyMeasurement ¶
func GetAlarmTagsList ¶
func GetAvailAndPLF ¶
func GetAvailAndPLF(totalTurbine float64, okTime float64, energy float64, machineDownTime float64, gridDownTime float64, countTimeStamp float64, hourValue float64, totalMinutes float64, plfDivider float64) (machineAvail float64, gridAvail float64, dataAvail float64, totalAvail float64, plf float64)
totalTurbine in float64 okTime sum ok time energy should be div by 1000 machineDownTime, gridDownTime already in hour value minutes should be div by 60
func GetDataDateAvailable ¶
func GetDayInYear ¶
func GetDurationInMonth ¶
func GetHFDFolder ¶
func GetHFDFolder() string
func GetHourValue ¶
func GetProjectList ¶
func GetProjectList() (result []md.ProjectOut, e error)
func GetProjectTurbineList ¶
func GetStartEndDate ¶
func GetStartEndDate(r *knot.WebContext, period string, tStart, tEnd time.Time) (startDate, endDate time.Time, err error)
add by RS, 2016-10-26 to assign start date & end date based on period type
func GetStateList ¶
func GetStateList(projlist []md.ProjectOut) (result []string, e error)
func GetTemperatureList ¶
func GetTurbineList ¶
func GetTurbineList(projects []interface{}) (result []md.TurbineOut, e error)
func GetTurbineNameList ¶
func HandleError ¶
func HelperSetDb ¶
func HelperSetDb(conn dbox.IConnection)
func ImageUploadHandler ¶
func UploadFileHandler ¶
func UploadHandler ¶
Types ¶
type Payloads ¶
type PayloadsDB ¶
Click to show internal directories.
Click to hide internal directories.