Code Monkey home page Code Monkey logo

gobacnet's People

Contributors

alexbeltran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gobacnet's Issues

when using api loggrus does not print to stdout

Right now the package is using global loggrus instead of keeping a local instance. This has caused issues when trying to use the loggrus package from outside the package. This was observed in baccli.

Flatten structure

The types subpackage is nice to handle internally but once other projects start to use it, a flatter structure would be nice so all the end user of the library will have to do is import gobacnet instead of import gobacnet and import gobacnet/types.

This flattening is less important for parts that are not exposed such as the tsm and utsm.

read mutil error!

read mutil error!
read property is ok. help

time="2022-08-29T12:01:32+08:00" level=debug msg="Broadcast Address: 192.168.32.255"
time="2022-08-29T12:01:32+08:00" level=debug msg="Local Address: 192.168.32.199/24"
time="2022-08-29T12:01:32+08:00" level=debug msg="Port: bac0"
time="2022-08-29T12:01:32+08:00" level=debug msg="Received IAm Message"
time="2022-08-29T12:01:34+08:00" level=debug msg="Received Complex Ack"
time="2022-08-29T12:01:34+08:00" level=debug msg="WEIRD PACKET: Class 2 Code 32: [48 1 14 12 0 0 0 7 30 41 70 94 145 2 145 32 95 41 85 78 68 193 199 32 164 79 31]"
time="2022-08-29T12:01:34+08:00" level=debug msg="Received Complex Ack"
time="2022-08-29T12:01:34+08:00" level=debug msg="WEIRD PACKET: Class 2 Code 32: [48 1 14 12 0 0 0 7 30 41 70 94 145 2 145 32 95 41 85 78 68 193 199 32 164 79 31]"
time="2022-08-29T12:01:34+08:00" level=error msg="read udp [::]:47808: use of closed network connection"

Add rate limiting based on bacnet device address

At the moment, we query devices as fast as possible. This may not be the best for devices since they are typically fairly slow. I think an option to have a rate limiter based on ever bacnet device address may help with congestion.

readprop command is not working

@alexbeltran hi, i tried whoIs command in my windows pc , its is working
but when i try to run readprop command im not getting the output
C:\Users\DELL\go\src\github.com\alexbeltran\gobacnet>baccli whoIs -i "Npcap Loopback Adapter" -p 47808
{
"ID": {
"Type": 8,
"Instance": 1294418
},
"MaxApdu": 1464,
"Segmentation": 0,
"Vendor": 260,
"Addr": {
"Net": 0,
"Len": 0,
"MacLen": 6,
"Mac": "qf7CI9KO",
"Adr": null
},
"Objects": {}
}
]
Failed to write to log, write gobacnet.log: file already closed
for the above command im getting the output like this

can you tell me how to run readprop commmand below i mentioned how did i tried

C:\Users\DELL\go\src\github.com\alexbeltran\gobacnet>baccli readprop -d 1294418 -o 0 -j 0 -i Npcap Loopback Adapterr

im getting the errors like
time="2019-08-08T17:18:19+05:45" level=fatal msg="route ip+net: no such network interface"
plz help me with this issue
thank you

Add graceful error handling

Right now when a read property is not handle correctly it will time out instead of interpreting type 80 messages.

Change error passing to add context

Currently all errors are simply passed. Adding a little bit of context as we pass it up the chain will help with debugging.

i.e.

_, err := os.Create()
if err != nil{
    return fmt.Errof("unable to create file: %v")
}

instead of

_, err := os.Create()
if err != nil{
    return err
}

This would be useful when passing up the chain since there are multiple stages and packages used for each command called. An example would be an error in the encoding portion could give additional context in the net layer so we know at what point it fails.

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.