source: packages/utils/collectd/patches/300-fix-modbus.patch @ 26346

Last change on this file since 26346 was 26346, checked in by florian, 5 years ago

[package] collected: add modbus plugin.

This enables the modbus plugin of collectd and patches it so it works with the current version of libmodbus

Signed-off-by: Daniel Golle <daniel.golle@…>

File size: 725 bytes
  • src/modbus.c

    a b  
    293293      host->node, host->port); 
    294294 
    295295  modbus_init_tcp (&host->connection, 
    296       /* host = */ host->node); 
    297 #if 0 
     296      /* host = */ host->node, 
    298297      /* port = */ host->port); 
    299 #endif 
    300298 
    301299  status = modbus_connect (&host->connection); 
    302300  if (status != 0) 
     
    366367  { 
    367368    status = read_holding_registers (&host->connection, 
    368369        /* slave = */ slave->id, /* start_addr = */ data->register_base, 
    369         /* num_registers = */ values_num, /* buffer = */ values); 
     370        /* num_registers = */ values_num, /* buffer = */ (uint16_t*)values); 
    370371    if (status > 0) 
    371372      break; 
    372373 
Note: See TracBrowser for help on using the repository browser.