Giter Site home page Giter Site logo

cosemlib's Introduction

DLMS/Cosem stack

This is an implementation of the DLMS/Cosem protocol in the BSD Open Source and permissive licence.

Developement goals

This Cosem stack has the following goals :

  • Pure portable and standalone ANSI C99 code
  • Fully unit tested with pre-defined vectors
  • Client/server implementation, LogicalName referencing, HLS/security policy 1
  • Examples using Cosem over TCP/IP
  • Memory efficient / no dynamic allocation (static, configurable at build-time)
  • Full traces and memory protected against buffer overflow

What is working so far

  • Utilities (buffer utilities)
  • BER coder/decoder
  • Basic association AARQ/AARE/RLRQ/RLRE (LLS)
  • Get Request normal of the Clock object
  • Set request normal
  • Action service
  • Exception response in case of problem
  • Full extensible/generable database layer to access to Cosem objects

Examples

The provided example is a server implementation using CosemLib. It includes traditionnal code such as a security library, a generic date-time code, log book and some registers.

The communication transport is using a TCP/IP layer using a Cosem IP wrapper header. The default port is 4059. The CosemLib is using one logical device (number 1) and is configured with two associations that have the following parameters:

Name Usage SAP Conformance block
Public client Mandatory 16 Get/Block transfer
Management R/W 1 Get/Set/Action/Block transfer/Selective Access

How to build

You will need QtCreator to load the project file. Any version of Qt is good, since we use raw ANSI C and QtCreator is only here as an nice IDE.

Three targets are available:

  • Debug/Release: traditional ones, the server example is compiled
  • Tests: build and launches stack unit tests

Basic manual and integration hints

FIXME

Development schedule

Version 1.0

  • Provide few complete cosem objects (Association, Clock)
  • HLS GMAC

Version 1.5

  • Get/Set by block
  • Get/Set with selective access
  • Attributes 0 and 1 managed by the database
  • Security Policy 1 + HAL algorithm layer
  • More Cosem objects (Profile, ObjectList of association)

Version 2.0

  • Test vectors using BlueBook examples and CTT packets
  • Cosem studio (database generator)
  • Cosem studio (simple scripting client)

Version 3.0

  • Multiple logical devices support
  • ACCESS service
  • GBT service
  • ECDSA + SHA-256 HLS
  • ECDSA data transport cyphering

cosemlib's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.