# Getting Started with CVB.Net

**URL:** <https://forum.commonvisionblox.com/t/getting-started-with-cvb-net/246>\
**Category:** .Net API\
**Tags:** csharp, tutorial\
**Created:** [September 9, 2019, 10:00pm UTC](https://forum.commonvisionblox.com/t/getting-started-with-cvb-net/246 "2019-09-09T22:00:00Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![parsd](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/parsd/32/7_2.png) [@parsd](https://forum.commonvisionblox.com/u/parsd)\
**Post date:** [September 11, 2019, 11:54am UTC](https://forum.commonvisionblox.com/t/getting-started-with-cvb-net/246/15 "2019-09-11T11:54:42Z")

</div>

# Transfer Monitoring

Here the focus is on the transfer “over the wire” and possible errors here. This is not connection monitoring: it’s about transfer statistics.

> [@parsd](#):
>
> # Stream Statistics

This topic is heavily transport technology dependent. That means that the available measurement points change from _vin_ driver to _vin_ driver. If the _vin_ driver supports different transport technologies (like the _GenICam.vin_), some statistacs may not be available even though the driver itself supports them.

At the time of writing the _GenICam.vin_ supports the following transfer related measurement points (descriptions are _GenICam.vin_ specific):

- `NumBuffersAcquired`

- `NumBuffersLostTransfer`

- `NumBuffersDelivered`

- `NumBuffersCorruptOnArrival`

- `NumBuffersCorruptOnDelivery`

- `NumPacketsReceived`

- `NumResends`

> **How to get the PassCorruptFrames BooleanNode**
>
> ```cs
> var streamNodeMap = device.NodeMaps[NodeMapNames.DataStream];
> var passCorruptFrames = streamNodeMap["PassCorruptFrames"] as BooleanNode;
> passCorruptFrames.Value = false; // true is the default
> 
> ```
> 
> If set to `False` only fully valid image buffers are seen by the app on `.Wait` calls. Bad buffers are simply requeued.

So for transfer monitoring regarding errors the important measurement points are:

- `NumBuffersLostTransfer`
- `NumBuffersCorruptOnArrival`/`NumBuffersCorruptOnDelivery`
- `NumResends`

An increased count of `NumResends` needn’t necessarily directly result in corrupted buffers. It is just a hint that you have problems with your connection. Packet resends can alleviate the problem (resulting in increased transfer time). You should investigate your setup if that occurs:

- test/exchange cables if no additional devices were added
- use e.g. interpacket delay if many devices share bandwidth (_GigE Vision_)

In case of increased `NumBuffersLostTransfer`/`NumBuffersCorruptOnArrival` you actually lost buffers and you cannot do anything about it anymore. If `NumBuffersCorruptOnDelivery` count increased since the last call, then the last image buffer returned by `.Wait` contains errors (e.g. because of missing packets there are “holes” containing old buffer data).

Remember: Collect the statistics right after the `.Wait` call to get correct information!

> **How to identify corrupted ranges**
>
> The easiest solution is to initialize the image buffer before unlocking it (by default via the next `.Wait` call after you finished your processing). Use a value you don’t care about (no feature) or which is not present in your images, e.g.:
> 
> ```cs
> streamImage.Initialize(.0);
> 
> ```

---

_[View the full topic](https://forum.commonvisionblox.com/t/getting-started-with-cvb-net/246)._
