• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bacnet-js / client / 19532691339
83%

Build:
DEFAULT BRANCH: master
Ran 20 Nov 2025 09:54AM UTC
Jobs 1
Files 44
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Nov 2025 09:52AM UTC coverage: 82.967% (-0.01%) from 82.981%
19532691339

push

github

web-flow
docs: update examples to use promise-based APIs (#60)

All examples were using deprecated callback-based APIs. Updated to use
async/await pattern matching the current library implementation.

### Changes

**discover-devices.ts**
- Converted `readProperty()` callbacks to async/await
- Removed unused `DecodeAcknowledgeSingleResult` import

**subscribe-cov.ts**
- Converted `subscribeCov()` callbacks to async/await

**read-device.ts**
- Refactored helper functions to async: `getAllPropertiesManually()`,
`parseValue()`, `parseDeviceObject()`
- Eliminated callback counting logic in favor of sequential async/await
- Reduced complexity from 255 to 220 lines

### Example

Before:
```typescript
bacnetClient.readProperty(address, objectId, PropertyIdentifier.OBJECT_NAME, 
  (err, value) => {
    if (err) {
      console.log(err)
    } else {
      // nested callback for vendor name
      bacnetClient.readProperty(address, objectId, PropertyIdentifier.VENDOR_NAME,
        (err2, valueVendor) => {
          // handle results
        }
      )
    }
  }
)
```

After:
```typescript
try {
  const value = await bacnetClient.readProperty(address, objectId, PropertyIdentifier.OBJECT_NAME)
  const valueVendor = await bacnetClient.readProperty(address, objectId, PropertyIdentifier.VENDOR_NAME)
  // handle results
} catch (err) {
  console.log(err)
}
```

> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `255.255.255.255`
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://g... (continued)

803 of 1241 branches covered (64.71%)

Branch coverage included in aggregate %.

4935 of 5675 relevant lines covered (86.96%)

37.32 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
98.44
-1.56% src/lib/request-manager.ts
Jobs
ID Job ID Ran Files Coverage
1 19532691339.1 20 Nov 2025 09:54AM UTC 44
82.97
GitHub Action Run
Source Files on build 19532691339
  • Tree
  • List 44
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #19532691339
  • 9e3c2342 on github
  • Prev Build on master (#18335790697)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc