Thursday, September 19, 2013

Ixonos sensact library – sensor/actuator communication made easy!

Fresh out of the Ixonos engineering labs comes the embedded HTML5 industrial prototype that Ixonos engineers are working on. The latest version of this prototype samples sensor data from a Texas Instruments multi-function sensor device http://www.ti.com/tool/boostxl-senshub which is connected via USB – this device includes various sensors (thermometer, compass, gyro, pressure, etc.).

To easily access these sensors we have created a library named “libsensact” which abstracts away the communication channel and input/output details of sensor or actuator devices – each device is simply characterized by it's name and the names of sensor/actuator variables that it provides. The communication channel which is abstracted can be any of USB, I2C, UART, Ethernet, EtherCAT, CAN, ProfiNET, etc.. Though, the first version of the library only supports USB.

The library offers simple connection handling functions and get/set functions for retrieving or setting sensor/actuator variable values of various types (char, int, float, etc.).

For example, retrieving the “temperature” and “pressure” values of the multi-function sensor device named “senshub0” is as simple as described by the following application code:
#include <stdio.h>
#include <unistd.h>
#include "sensact.h" 

#define TIMEOUT 100 // ms

int main(void)
{
  int device;
  float temp;
  float pressure;
  int status;

  device = connect("senshub0");

  status = get_float(device, "temperature", &temp, TIMEOUT);
  if (status < 0)
    printf("Error fetching temperature.");
  else
    printf("Sensor Temperature: %f\n", temp);

  status = get_float(device, "pressure", &pressure, TIMEOUT);
  if (status < 0)
    printf("Error fetching pressure.");
  else
    printf("Sensor Pressure: %f\n", pressure);

  disconnect(device);

  return 0;
}
Also, for each sensor/actuator device, the library contains an entry in a device configuration structure list which contains device specific configurations. For example, the “senshub0” device is configured by the following code:
#include "device.h"

/* List of supported sensor/actuator devices */ 

struct device_t device[] = 
{ 
  { .name = "senshub0", 
    .description = "TI Sensor Hub USB device", 
    .connection = USB, 
    .vid = 0x1CBE, 
    .pid = 0x0003, 
    .endpoint = 0x1 }, 
  { } 
}
For different connection types there will be different “.connection” definitions and subsequently different related dot configuration variables.

Future plans for this library are to add support for more connection types and extend the API with subscriber type functionality so that the user can register callback functions which will be called upon value changes for sensor/actuator devices which are able to support event-driven communication.

Watch out for more blog entries on this library as it evolves...

That's it – keep it simple!

Martin Lund, System Architect - Ixonos

20 comments:

  1. Tulisanya SANGAT BERMANFAAT, semoga semakin SUKSES dan BANJIR ORDER. Amin...
    Dari: kuch2hotahu |Email: kuch2hotahu@gmail.com / franchisemurah2014@gmail.com | No. HP: 085.317.006.007 (Telkomsel) , 085.608.002.007 (Indosat) ,085.743.114.560 (Indosat), 081.219.806.009 (Telkomsel), 087.883.652.007 (XL) , 085.710.662.299 (Indosat)|website : http://kuch2hotahu.com/ | twitter : kuch2hotahu | FB : Kuch2hotahu

    ReplyDelete
  2. Tulisanya SANGAT BERMANFAAT, semoga semakin SUKSES dan BANJIR ORDER. Amin...
    Dari: Bpk.Adjie Gumay | https://twitter.com/adjiegumay | Email: Herbal_extract@yahoo.co.id / pelangsingbadanaman@gmail.com | Tlpn: 081.906.041.973 (XL)

    ReplyDelete
  3. Tulisanya SANGAT BERMANFAAT, semoga semakin SUKSES dan BANJIR ORDER. Amin...
    Dari: Bibit Buah DURIAN Murah | http://www.jualbibitdurian.com/ , http://bibitdurianbawor.com/ , http://www.bibitdurianmusangking.com/ | Pin:29EB46D9 | Hot line 081.327.119.234 (Simpati) | Tlpn: 085.747.754.569 (IM3) / 087.837.300.839 (XL) | FB: jualbibitdurianmontong(jualbibitdurianbawor) | FB: Taufiq Ismail (juragan durian)

    ReplyDelete
  4. Tulisanya SANGAT BERMANFAAT, semoga semakin SUKSES dan BANJIR ORDER. Amin...
    Dari: Bpk. Iwan, Ibu Tri | http://superdetergentultracomatic.blogspot.com/ | Email: detergentultracomatic@gmail.com | Tlpn: 087.722.777.439 (XL), 081.221.433.309 (Telkomsel)

    ReplyDelete
  5. Tulisanya SANGAT BERMANFAAT, semoga semakin SUKSES dan BANJIR ORDER. Amin...
    Dari: Kacang Almond MURAH | http://kacangalmond.com/ | +62.857.2801.6909 (INDOSAT) | FB: https://www.facebook.com/pages/Kacang-Almond-Murah/533330553425189

    ReplyDelete
  6. Kami Bergerak Dalam Pembibitan Durian BAWOR, Durian MONTONG, Durian Menoreh Kuning, Durian Musang King dan Durian Unggulan Lainya.

    Kami Siap Melayani Pesanan baik GROSIR atau eceran

    Alamat : Purwosari Rt06/01 Kecamatan Puring Kab Kebumen.

    Telpon: 0813 2711 9234 (Simpati) / 0857 4775 4569 (IM3) / 0878 3730 0839 (XL)

    PIN BB: 29EB 46D9

    Website : www.jualbibitdurian.com, www.bibitdurianbawor.blogspot.com, www.durianmusangking.blogspot.com, web www.bibitduriansiapbuah.blogspot.com

    ReplyDelete
  7. Kami Bergerak Dalam Pembibitan Durian BAWOR, Durian MONTONG, Durian Menoreh Kuning, Durian Musang King dan Durian Unggulan Lainya.

    Kami Siap Melayani Pesanan baik GROSIR atau eceran

    Alamat : Purwosari Rt06/01 Kecamatan Puring Kab Kebumen.

    Telpon: 0813 2711 9234 (Simpati) / 0857 4775 4569 (IM3) / 0878 3730 0839 (XL)

    PIN BB: 29EB 46D9

    Website : www.jualbibitdurian.com, www.bibitdurianbawor.blogspot.com, www.durianmusangking.blogspot.com, web www.bibitduriansiapbuah.blogspot.com

    ReplyDelete
  8. Kami Bergerak Dalam Pembibitan Durian BAWOR, Durian MONTONG, Durian Menoreh Kuning, Durian Musang King dan Durian Unggulan Lainya.

    Kami Siap Melayani Pesanan baik GROSIR atau eceran

    Alamat : Purwosari Rt06/01 Kecamatan Puring Kab Kebumen.

    Telpon: 0813 2711 9234 (Simpati) / 0857 4775 4569 (IM3) / 0878 3730 0839 (XL)

    PIN BB: 29EB 46D9

    Website : www.jualbibitdurian.com, www.bibitdurianbawor.blogspot.com, www.durianmusangking.blogspot.com, web www.bibitduriansiapbuah.blogspot.com

    ReplyDelete
  9. dewacinta
    dewacintaqq
    dewacintaqq
    dewacintaqq.com
    dewa cintaqq
    daftar dewacintaqq
    link alternatif dewacintaqq

    dewacintaqq
    dewacintaqq.com
    dewa cintaqq
    daftar dewacintaqq
    link alternatif dewacintaqq

    dewacintaqq
    dewacintaqq.com
    dewa cintaqq
    daftar dewacintaqq
    link alternatif dewacintaqq

    dewacintaqq
    dewacintaqq.com
    dewa cintaqq
    daftar dewacintaqq
    link alternatif dewacintaqq

    DewacintaQQ
    link alternatif Dewacintaqq
    Deposit
    Deposit dewacintaqq
    Poker Indonesia
    Poker Online Indonesia
    Bandar QQ
    Agen Ceme Online
    Daftar Situs Poker
    Poker Online Terpercaya
    Judi Poker
    Poker Online Uang Asli
    Poker Uang Asli
    Situs Poker Online
    Agen Poker
    Poker88
    Capsa Susun Online
    daftar idn poker
    idnpoker
    bigceme
    ceme
    ceme online
    bandar ceme
    idn poker
    Idnplay
    idn play
    poker
    poker idn
    agen poker online
    poker online
    situs poker online
    judi online
    situs judi online

    Bandar poker terpercaya
    situs judi online
    situs poker online
    -----------------------------------------------------------------------------
    Bandarq online terpercaya
    Delimapoker situs resmi daftar judi online
    aduq uang asli qq online domino QQ
    bandarq,judi online
    ---------------------------------------------------------------------------------
    Bandar poker terpercaya
    situs judi online
    bandar poker
    capsa susun
    ------------------------------------------------------------------------------------
    Bandar poker terpercaya
    judi poker online
    bandar poker online
    situs judi online
    situs poker online
    ------------------------------------------------------------------------------------
    Bandar poker terpercaya
    Poker Indonesia
    Poker Online Indonesia
    Agen Ceme Online
    Daftar Situs Poker
    Poker Online Terpercaya
    Poker Online Uang Asli
    Poker Uang Asli
    Situs Poker Online


    ReplyDelete
  10. dewacinta
    dewacintaqq
    dewacintaqq
    dewacintaqq.com
    dewa cintaqq
    daftar dewacintaqq
    link alternatif dewacintaqq

    dewacintaqq
    dewacintaqq.com
    dewa cintaqq
    daftar dewacintaqq
    link alternatif dewacintaqq

    dewacintaqq
    dewacintaqq.com
    dewa cintaqq
    daftar dewacintaqq
    link alternatif dewacintaqq

    dewacintaqq
    dewacintaqq.com
    dewa cintaqq
    daftar dewacintaqq
    link alternatif dewacintaqq

    DewacintaQQ
    link alternatif Dewacintaqq
    Deposit
    Deposit dewacintaqq
    Poker Indonesia
    Poker Online Indonesia
    Bandar QQ
    Agen Ceme Online
    Daftar Situs Poker
    Poker Online Terpercaya
    Judi Poker
    Poker Online Uang Asli
    Poker Uang Asli
    Situs Poker Online
    Agen Poker
    Poker88
    Capsa Susun Online
    daftar idn poker
    idnpoker
    bigceme
    ceme
    ceme online
    bandar ceme
    idn poker
    Idnplay
    idn play
    poker
    poker idn
    agen poker online
    poker online
    situs poker online
    judi online
    situs judi online

    Bandar poker terpercaya
    situs judi online
    situs poker online
    -----------------------------------------------------------------------------
    Bandarq online terpercaya
    Delimapoker situs resmi daftar judi online
    aduq uang asli qq online domino QQ
    bandarq,judi online
    ---------------------------------------------------------------------------------
    Bandar poker terpercaya
    situs judi online
    bandar poker
    capsa susun
    ------------------------------------------------------------------------------------
    Bandar poker terpercaya
    judi poker online
    bandar poker online
    situs judi online
    situs poker online
    ------------------------------------------------------------------------------------
    Bandar poker terpercaya
    Poker Indonesia
    Poker Online Indonesia
    Agen Ceme Online
    Daftar Situs Poker
    Poker Online Terpercaya
    Poker Online Uang Asli
    Poker Uang Asli
    Situs Poker Online

    ReplyDelete
  11. First of all, thank you for letting me see this information. I think this article can give me a lot of inspiration. I would appreciate if you could post more good contents in the future. Feel free to visit my website; 먹튀검증

    ReplyDelete
  12. I blog often and I truly appreciate your content. This great article has truly peaked my interest. I’m going to bookmark your site and keep checking for new details about once per week. I subscribed to your Feed too. Feel free to visit my website; 토토사이트

    ReplyDelete
  13. I am really impressed with your blog article, such great & useful information you mentioned here. I have read all your posts and all are very informative. Thanks for sharing and keep it up like this. Feel free to visit my website; 바카라사이트

    ReplyDelete
  14. You also can guess on politics and the result result} of particular occasions such as the Eurovision contest, X Factor and the FIFA World Cup Qatar 2022. The manner in which you place your bets varies relying on kind of|the kind of} sport or sport. We additionally supply 온라인카지노 live betting along with our traditional pre-event betting.

    ReplyDelete
  15. This blog is so interesting and informative. keep sharing.abogado dui petersburg va

    ReplyDelete
  16. According to "no-fault" principles, couples in New Jersey are able to end their marriage without placing blame on one another. Divorce grounds include excessive cruelty, separation, and irreconcilable differences. The fair distribution of marital property is given priority by New Jersey courts, which may also take into account each spouse's financial status and contributions to the union. In addition, alimony may be granted in accordance with criteria including the length of the marriage, each party's style of living, and their respective earning potential. For individualized advice, it is best to speak with a family law attorney in your area.
    Visit site: Divorce law new jersey

    ReplyDelete
  17. The libsensact library is a useful abstraction layer for interfacing with sensor and actuator devices, particularly with USB communication support. It offers a simple API for accessing sensor/actuator data, with error handling and return status codes. The library plans to support more connection types and event-driven functionality, with improvements in error handling, documentation, event-driven communication, connection flexibility, and rigorous testing. Future improvements include data type abstraction, asynchronous operations, resource management, security, and platform independence. The library should also enhance error reporting, provide configuration flexibility, and integrate with common frameworks. wills and estates lawyer

    ReplyDelete
  18. Thanks for your loveable content. I like this post. Great! Tráfico Abogado Charlottesville VA

    ReplyDelete
  19. "This web post is very good. It is also very wonderful. It was my favorite post.
    I look forward to the next blog as well. great work. abogado conducción imprudente washington condado va"

    ReplyDelete