APIs

Application Programming Interfaces

inSCADA platformunda script ve expression servisleri içerisinde javascript programlama dilini kullanarak uygulamalarınızı zenginleştirebilirsiniz. inSCADA script ve expression servislerini platformun etkileşiminizi artırmak için API 'ler sunar. Tüm bu API'lere "ins." sınıfı ile ulaşabilirsiniz.

APIs

Variable Functions

  • ins.getVariableValue(projectName, variableName)

  • ins.getVariableValue(projectName, variableName, Integer index)

  • ins.getVariableValues(projectName, variableName, fromIndex, toIndex)

  • ins.getVariableValues(projectName, variableNames)

  • ins.getVariableValue(variableName)

  • ins.getVariableValue(variableName, index)

  • ins.getVariableValues(variableName, fromIndex, toIndex)

  • ins.getVariableValues(variableNames)

  • ins.getProjectVariableValues(projectName)

  • ins.getProjectVariableValues()

  • ins.setVariableValue(projectName, variableName, {details})

  • ins.setVariableValue(variableName, {details})

  • ins.setVariableValues(projectName, variableAndDetails)

  • ins.setVariableValues(Map<String, Map<String, Object>> variableAndDetails)

  • ins.setVariableValue(variableName, {value})

  • ins.setVariableValues(variables)

  • ins.mapVariableValue(projectName, src, dest)

  • ins.mapVariableValue(src, dest)

  • ins.mapVariableValue(projectName, src, dest, Object defaultValue)

  • ins.mapVariableValue(src, dest, defaultValue)

Connection Functions

  • ins.startConnection(projectName, connectionName)

  • ins.startConnection(connectionName)

  • ins.stopConnection(projectName, connectionName)

  • ins.stopConnection(connectionName)

  • ins.getConnectionStatus(connectionId)

  • ins.getConnectionStatus(projectName, connectionName)

  • ins.getConnectionStatus(connectionName)

Project Functions

  • ins.getProject()

  • ins.getProjects(boolean isActive)

  • ins.getProjects()

Alarm Functions

  • ins.getAlarmGroup(alarmGroupName

  • ins.getAlarmGroup(projectName, alarmGroupName)

  • ins.activateAlarm(projectName, alarmName)

  • ins.activateAlarm(alarmName)

  • ins.deactivateAlarm(projectName, alarmName)

  • ins.deactivateAlarm(alarmName)

  • ins.getAlarmStatus(projectName, alarmName)

  • ins.getAlarmStatus(alarmName)

  • ins.getLastFiredAlarm(projectName, index)

  • ins.getLastFiredAlarm(index)

  • ins.getLastFiredAlarm(projectName, index, boolean includeOff)

  • ins.getLastFiredAlarm(index, boolean includeOff)

  • ins.getLastFiredAlarms(projectName, index, count)

  • ins.getLastFiredAlarms(index, count)

  • ins.getLastFiredAlarms(projectName, index, count, boolean includeOff)

  • ins.getLastFiredAlarms(index, count, boolean includeOff)

  • ins.getLastFiredAlarmsByDate(projectName, startDate, endDate, includeOff, limit)

  • ins.getLastFiredAlarmsByDate(startDate, endDate, includeOff, limit)

  • ins.getAlarmLastFiredAlarms(projectName, boolean includeOff)

  • ins.getAlarmLastFiredAlarms(includeOff)

  • ins.acknowledgeAlarm(FiredAlarmDto firedAlarmDto, acknowledger)

  • ins.acknowledgeAlarm(projectName, alarmId, firedAlarmType, onTime, acknowledger)

  • ins.acknowledgeAlarm(alarmId, firedAlarmType, onTime, acknowledger)

Script Functions

  • ins.getScript(projectName, scriptName)

  • ins.getScript(scriptName)

  • ins.getScriptStatus(projectName, scriptName)

  • ins.getScriptStatus(scriptName)

  • ins.scheduleScript(projectName, scriptName)

  • ins.scheduleScript(scriptName)

  • ins.cancelScript(projectName, scriptName)

  • ins.cancelScript(scriptName)

  • ins.executeScript(projectName, scriptName)

  • ins.executeScript(scriptName)

In-Memory Database Functions

  • ins.getGlobalObject(Stringname)

  • ins.setGlobalObject(name, object)

Trend Functions

  • ins.getTrends()

  • ins.getTrendTags(trendId)

System Functions

  • ins.getSystemRequests()

  • ins.deleteSystemRequest(SystemRequest systemRequest)

  • ins.getSystemStats()

  • ins.shutdown()

  • ins.restart()

User Functions

  • ins.getLastAuthAttempts()

Date-Time Functions

  • ins.now()

  • ins.setDateTime(ms)

  • ins.getDate(ms)

String Functions

  • ins.leftPad(str, int len, padChar)

  • ins.formatNumber(number, pattern, decimalS, groupingS)

Notification Functions

  • ins.notify(type, title, message)

  • ins.notify(Map<String, Object> objectmap)

  • ins.sendMail(usernames, subject, content)

  • ins.sendMail(usernames, subject, content, htmlContent)

  • ins.sendSMS(usernames, message)

  • ins.sendSMS(usernames, message, provider)

Confirmation Functions

  • ins.confirm(type, Title, message, object)

  • ins.numpad(variableName)

Database Functions

  • ins.writeLog(type, source, activity, msg)

  • ins.writeLog(projectName, type, activity, msg)

  • ins.getLoggedVariableValueStats(projectName, variableNames, startDate, endDate)

  • ins.getLoggedVariableValueStats(variableNames, startDate, endDate)

  • ins.getLoggedHourlyVariableValueStats(variableNames, startDate, endDate)

  • ins.getLoggedDailyVariableValueStats(projectName, variableNames, startDate, endDate)

  • ins.getLoggedDailyVariableValueStats(variableNames, startDate, endDate)

  • ins.getLoggedVariableValueStatsByInterval(projectName, names, startDate, endDate, interval)

  • ins.getLoggedVariableValueStatsByInterval(names, startDate, endDate, interval)

  • ins.getLoggedVariableNames(projectName)

  • ins.getLoggedVariableNames()

  • ins.runSql(query)

Other Functions

  • ins.exec(command)

  • ins.rest(httpMethod, url, contentType, object)

  • ins.loc(lang,key)

  • ins.sendMapFiredAlarmStatus()

  • ins.sendMapData(name, coordinate, popup)

  • ins.playAudio(isStart, name, isLoop)

  • ins.sliderPad(Map<String, Object> objectMap)

Data Transfer Functions

  • ins.getDataTransferStatus(projectName, dataTransferName)

  • ins.getDataTransferStatus(dataTransferName)

  • ins.cancelDataTransfer(datatrasfername)

  • ins.scheduleDataTransfer(datatransfername)

  • ins.scheduleDataTransfer(projectName, dataTransferName)

  • ins.scheduleDataTransfer(dataTransferName)

  • ins.cancelDataTransfer(projectName, dataTransferName)

  • ins.cancelDataTransfer(dataTransferName)

Last updated