This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

bacnet client app
#35
(27.08.2024, 08:56)Daniel Wrote: Can't really say much from the info provided.

This is the script which generates load.
What else I can check?

Code:
local mb = require('user.mbslave')
local copas = require('copas')
local socket = require('socket')
local address = '*'
local port = 502
local server = assert(socket.bind(address, port))

mb.setmapping({
  ['*'] = {
    coils = {
      [0] = 'U.5.004_LightOnOff',
      [1] = 'U.5.003_LightOnOff',
      [2] = 'U.5.002_LightOnOff',
      [3] = 'U.5.004_LightSts',
      [4] = 'U.5.003_LightSts',
      [5] = 'U.5.002_LightSts',
      [6] = 'U.5.004_LightOnOffWC',
      [7] = 'U.5.003_LightOnOffWC',
      [8] = 'U.5.002_LightOnOffWC',
      [9] = 'U.5.004_LightStsWC',
      [10] = 'U.5.003_LightStsWC',
      [11] = 'U.5.002_LightStsWC',
       
      [12] = 'U.5.004_FancoilOnOff',
      [13] = 'U.5.003_FancoilOnOff',
      [14] = 'U.5.002_FancoilOnOff',
      [15] = 'U.5.004_FancoilStatus',
      [16] = 'U.5.003_FancoilStatus',
      [17] = 'U.5.002_FancoilStatus',
      [18] = 'U.5.004_FancoilAlarm',
      [19] = 'U.5.003_FancoilAlarm',
      [20] = 'U.5.002_FancoilAlarm',
       
      [21] = 'U.5.004_Call',
      [22] = 'U.5.003_Call',
      [23] = 'U.5.002_Call',
       
      [24] = '5.SHAVIP.2_D1_KNXStatus',
      [25] = '5.SHAVIP.2_D2_KNXStatus',
      [26] = '5.SHAVIP.2_MEGateway_Status',
      [27] = '7.SHAUOV.6_Status',
       
      [28] = '5.SHAVIP.2_LightOnOff',
      [29] = '5.SHAVIP.2_LightOnOffWCStaff',
      [30] = '5.SHAVIP.2_DisableButtons',
       
      [31] = 'U.5.004_Status',
      [32] = 'U.5.004_Status',
      [33] = 'U.5.004_Status'
      },
    registers = {
      [0] = 'U.5.004_LightDim',
      [1] = 'U.5.003_LightDim',
      [2] = 'U.5.002_LightDim',
      [3] = 'U.5.004_LightDimWC',
      [4] = 'U.5.003_LightDimWC',
      [5] = 'U.5.002_LightDimWC',
       
      [6] = 'U.5.004_Temp',
      [7] = 'U.5.003_Temp',
      [8] = 'U.5.002_Temp',
      [9] = 'U.5.004_Setpoint',
      [10] = 'U.5.003_Setpoint',
      [11] = 'U.5.002_Setpoint',
       
      [12] = 'U.5.004_FancoilErrorCode',
      [13] = 'U.5.003_FancoilErrorCode',
      [14] = 'U.5.002_FancoilErrorCode',
       
      [15] = '5.SHAVIP.2-D1_1_GenFaultCount',
      [16] = '5.SHAVIP.2-D1_1_FaultLampCount',
      [17] = '5.SHAVIP.2-D1_1_FaultECGCount',
      [18] = '5.SHAVIP.2-D1_2_GenFaultCount',
      [19] = '5.SHAVIP.2-D1_2_FaultLampCount',
      [20] = '5.SHAVIP.2-D1_2_FaultECGCount',
      [21] = '5.SHAVIP.2-D2_1_GenFaultCount',
      [22] = '5.SHAVIP.2-D2_1_FaultLampCount',
      [23] = '5.SHAVIP.2-D2_1_FaultECGCount',
      [24] = '5.SHAVIP.2-D2_2_GenFaultCount',
      [25] = '5.SHAVIP.2-D2_2_FaultLampCount',
      [26] = '5.SHAVIP.2-D2_2_FaultECGCount'
    }
  }
})

mb.setswap('w')
mb.setfloat16precision(2)

local function handler(sock)
  copas.setErrorHandler(log)

  sock = copas.wrap(sock)
  sock:settimeout(60)

  while true do
    local res, err = mb.tcphandler(sock)
    if not res then
      break
    end
  end

  sock:close()
end

copas.addserver(server, handler, 60)
copas.loop()
Reply


Messages In This Thread
bacnet client app - by domotiqa - 12.01.2024, 09:31
RE: bacnet client app - by Daniel - 12.01.2024, 11:50
RE: bacnet client app - by domotiqa - 15.01.2024, 05:52
RE: bacnet client app - by domotiqa - 06.03.2024, 08:40
RE: bacnet client app - by admin - 06.03.2024, 08:54
RE: bacnet client app - by domotiqa - 06.03.2024, 09:22
RE: bacnet client app - by Daniel - 06.03.2024, 11:23
RE: bacnet client app - by domotiqa - 06.03.2024, 15:30
RE: bacnet client app - by Daniel - 06.03.2024, 15:32
RE: bacnet client app - by domotiqa - 06.03.2024, 16:26
RE: bacnet client app - by Daniel - 07.03.2024, 08:54
RE: bacnet client app - by domotiqa - 07.03.2024, 15:37
RE: bacnet client app - by Daniel - 07.03.2024, 15:39
RE: bacnet client app - by domotiqa - 07.03.2024, 15:49
RE: bacnet client app - by admin - 07.03.2024, 15:55
RE: bacnet client app - by domotiqa - 07.03.2024, 16:11
RE: bacnet client app - by admin - 07.03.2024, 16:15
RE: bacnet client app - by domotiqa - 07.03.2024, 16:48
RE: bacnet client app - by Daniel - 07.03.2024, 17:08
RE: bacnet client app - by domotiqa - 11.03.2024, 06:31
RE: bacnet client app - by admin - 11.03.2024, 06:46
RE: bacnet client app - by domotiqa - 11.03.2024, 07:01
RE: bacnet client app - by admin - 11.03.2024, 07:03
RE: bacnet client app - by domotiqa - 11.03.2024, 14:51
RE: bacnet client app - by djaval - 27.08.2024, 06:49
RE: bacnet client app - by Daniel - 27.08.2024, 07:26
RE: bacnet client app - by djaval - 27.08.2024, 07:43
RE: bacnet client app - by Daniel - 27.08.2024, 08:06
RE: bacnet client app - by djaval - 27.08.2024, 08:13
RE: bacnet client app - by Daniel - 27.08.2024, 08:16
RE: bacnet client app - by djaval - 27.08.2024, 08:22
RE: bacnet client app - by Daniel - 27.08.2024, 08:27
RE: bacnet client app - by djaval - 27.08.2024, 08:42
RE: bacnet client app - by Daniel - 27.08.2024, 08:56
RE: bacnet client app - by djaval - 27.08.2024, 09:20
RE: bacnet client app - by Daniel - 27.08.2024, 09:34
RE: bacnet client app - by djaval - 27.08.2024, 10:01
RE: bacnet client app - by admin - 27.08.2024, 10:07
RE: bacnet client app - by djaval - 27.08.2024, 10:35

Forum Jump: