GithubHelp home page GithubHelp logo

research-virtualfortknox / msb-client-websocket-csharp Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 4.0 379 KB

The c# client library to connect to the websocket interface of the MSB (Manufacturing Service Bus)

License: Apache License 2.0

C# 99.43% Batchfile 0.20% Shell 0.36%
csharp msb websocket-interface msb-client msb-client-websocket

msb-client-websocket-csharp's Introduction

VFK Research Logo

MSB websocket client library for C#

Build Status Nuget Coverage Status FOSSA Status

Compatibility Matrix

Client version compatibility to MSB versions:

1.5.x-RELEASE 1.6.x-RELEASE
1.0.x x x

Welcome

  • If you want to contribute, please read the Contribution Guidelines.

  • If you want to test this client, see the sample projects in the samples directory.

  • If you want to know how to use this client in your own project, read how to use.

msb-client-websocket-csharp's People

Contributors

408b7f8b avatar daniel-schel avatar fossabot avatar ipamaas avatar ma-sch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

msb-client-websocket-csharp's Issues

Support Gateway service type

The MSB supports, besides the two service types offered by this project (SmartObject, Application), the service type Gateway. This allows to register a service with sub services managed by it and to handle their communication.

This feature is already supported by the msb-client-websocket-java lib.

Coverage report is not generated for test projects with failing test(s)

I'm submitting a ...

  • bug report
  • feature request
  • other

Current behavior:

If any test fails the wohle test project is not considered in the coverage report and the coverage drops down.

Expected behavior:

Coverage report should be generated even if a test fails.

Steps to reproduce:

Execute tests with coverage with a failing test.

MSB client version: 1.0.0

MSB server version: 1.5.6-RELEASE

Anything else:

Issue in coverlet

Possible solution:
Use coverlet.console to execute tests.

application.properties incomplete in "How To"

Describe the bug
"application.properties" given in the How To (https://github.com/research-virtualfortknox/msb-client-websocket-csharp/blob/master/docs/HOW_TO_USE.md#alternative-1---by-applicationproperties) is incomplete and does not lead to a startable client. The 'msb.url Tag is missing.

To Reproduce
Steps to reproduce the behavior:

  1. create a application.properties file with the following content: (Copied from How To)
    msb.uuid=76499d88-34cf-4836-8cc1-7e0d9c54dacx
    msb.name=YourSmartObjectName
    msb.description=YourSmartObjectDesc
    msb.token=5e0d9c54dacx
    msb.type=SmartObject
  2. call "ApplicationProperties myApplicationProperties = ApplicationProperties.Read();"
  3. an exception is thrown:
    Der angegebene Schlüssel war nicht im Wörterbuch angegeben. bei System.Collections.Generic.Dictionary`2.get_Item(TKey key)
    bei Fraunhofer.IPA.MSB.Client.API.Configuration.ApplicationProperties.Read()

Expected behavior
The How To should lead to a valid client. A better error message (i.e. "Tag 'msb.url' is missing") would have been great, too.

Environment (please complete the following information):

  • MSB client version: 1.0.1

Convertion Exception, if client uses Int32 as Parameter in a Function

Describe the bug
The call of a function with Int32 parameter on a c# based client seems to crash the client application.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the steps from the How To and define a class like the attached one
    MSBFunctionCode.txt
  2. create an instance and add it as function handler to the application
  3. connect, register and verify the application
  4. Call the function via web interface (screenshot further below)
  5. The client crashs with exception
    Exception.txt

Expected behavior
No crash, but a successful call.

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot of used call:
grafik

Environment (please complete the following information):

Data format for arrays of primitive types is generated incorrectly

Describe the bug
Data format for arrays of primitive types is generated incorrectly.

[MsbFunctionParameter(Name = "arrayOfPrimitiveType")] int[] arrayOfPrimitiveType

leads to the following data format

"dataFormat":{
  "arrayOfPrimitiveType":{
    "$ref":"#/definitions/Int32"
  },
  "Int32":{
    "type":"array",
    "items":{
      "type":"integer",
      "format":"int32"
    }
  }
}

To Reproduce
Create function with array of primtive type as parameter

Expected behavior
[MsbFunctionParameter(Name = "arrayOfPrimitiveType")] int[] arrayOfPrimitiveType

should generate the following data format:

"dataFormat":{
  "arrayOfPrimitiveType":{
    "type":"array",
    "items":{
      "type":"integer",
      "format":"int32"
    }
  }
}

Environment:

  • MSB client version: 1.0.1
  • MSB version: 1.5.7-RELEASE

Additional context
Causes System.ArgumentException "An item the same key has already been added..." when two parameters are an array of a primitive type.

Reconnection fails

Describe the bug
Reconnection fails for several hours in a row, while the server is properly working and reachable.

To Reproduce
Steps to reproduce the behavior:

  1. Connect the client
  2. Disconnect and reconnect network for 15s

Expected behavior
The connection should be re-established at the first reconnect.

Environment (please complete the following information):

  • MSB client version v1.0.7
  • MSB version 1.6.0-RELEASE

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.