{"id":27524804,"url":"https://github.com/pdav/casan","last_synced_at":"2025-04-18T13:13:10.219Z","repository":{"id":33008504,"uuid":"36641686","full_name":"pdav/casan","owner":"pdav","description":"Common Architecture for Sensor and Actuator Networks","archived":false,"fork":false,"pushed_at":"2016-03-05T23:00:07.000Z","size":7589,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-08-12T10:17:00.870Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pdav.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-01T06:17:55.000Z","updated_at":"2018-10-02T13:42:24.000Z","dependencies_parsed_at":"2022-09-04T00:41:48.598Z","dependency_job_id":null,"html_url":"https://github.com/pdav/casan","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdav%2Fcasan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdav%2Fcasan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdav%2Fcasan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdav%2Fcasan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdav","download_url":"https://codeload.github.com/pdav/casan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249496665,"owners_count":21281699,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-18T13:13:09.646Z","updated_at":"2025-04-18T13:13:10.209Z","avatar_url":"https://github.com/pdav.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Common Architecture for Sensor and Actuator Networks (CASAN)\n============================================================\n\nThis is the source code for CASAN.\n\nThis directory is structured as follows:\n\n* c-master: code for the master (C++ version)\n* py-master: code for the master (Python version, needs Python \u003e= 3.4)\n* arduino: code for the slave running on Arduino\n\nPlease read the specific README in each subdirectory.\n\n\nSource code style guide\n-----------------------\n\nHere are some elements of style for reading the source code:\n\n- all source files are developped with a classical text editor (vi).\n- indentation is 4 space wide.\n- don't modify the tabulation size in your editor configuration: it\n    should remain the standard 8 column, as with your printer.\n    So, indentation is a combination of tabulations or spaces.\n- CASAN C++ master code is documented via Doxygen. To generate the complete\n    documentation, you need `doxygen`, `dot` (part of graphviz) and\n    `pdflatex`: just type `make pdf` in `./c-master` directory.\n- CASAN slave code is documented via Doxygen. To generate the complete\n    documentation, you need `doxygen`, `dot` (part of graphviz) and\n    `pdflatex`: just type `make pdf` in `./arduino/libraries` directory.\n\n\nNotes for Linux\n---------------\n\nThis section give some quirks to work on Linux.\n\n### How to detect USB device for Digi XStick on Linux?\n\nUse the *lsusb* command:\n\n    # lsusb -d 0403:6001\t\t\t# vendorId : productId\n\t0403 is hex for FTDI SB-serial\n\t6015 is hex for Digi dev \t\t# 6001 for Zigduino's\n\nTo find all USB-serial devices:\n\n    # lsusb -d 0403:\n\nHowever, the lsusb command does not report device path in /dev\n\n### How to assign a symbolic (persistant) name for an USB device?\n\nThe problem is that USB devices are automatically numbered by the kernel, and this numbering is not stable over time.\n\nSee http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/\n\nMethod:\n\n    # udevadm info --attribute-walk /dev/ttyUSB0 | grep '{serial}' | head -n1\n        ATTRS{serial}==\"DA00AFPO\"\n\nCreate a new file called /etc/udev/rules.d/99-usb-serial.rules and put\nthe following line in there:\n\n    SUBSYSTEM==\"tty\", ATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"6015\", ATTRS{serial}==\"DA00AFPO\", SYMLINK+=\"zig0\"\n    SUBSYSTEM==\"tty\", ATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"6015\", ATTRS{serial}==\"DA00AFPQ\", SYMLINK+=\"zig1\"\n    SUBSYSTEM==\"tty\", ATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"6001\", SYMLINK+=\"digi\"\n\nand restart udev:\n\n    # service udev restart\n\nUnplug and plug again your devices. You should show them:\n\n    # ls -l /dev/zig*\n    lrwxrwxrwx 1 root root 7 Apr 17 11:54 /dev/zig0 -\u003e ttyUSB0\n    lrwxrwxrwx 1 root root 7 Apr 17 11:54 /dev/zig1 -\u003e ttyUSB1\n\n\nCode metrics\n------------\n\nReliable code metrics:\n\n### Master\n\n    $ find c-master -name \"*.[ch]*\" | xargs wc -l\n    $ find c-master -name \"*.[ch]*\" | xargs cat | tr -d -c \";\" | wc -c\n\n### Arduino slave\n\n    $ find arduino/libraries -name \"*.[ch]*\" | grep -v /boards/ | xargs wc -l\n    $ find arduino/libraries -name \"*.[ch]*\" | grep -v /boards/ | xargs cat | tr -d -c \";\" | wc -c\n\nNote: sub-directory `/boards` is not counted since it includes all boards\nsupported by the uracoli library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdav%2Fcasan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdav%2Fcasan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdav%2Fcasan/lists"}