Debugging Your Interface and Protocol Projects
- Updated2025-09-22
- 5 minute(s) read
Debugging Your Interface and Protocol Projects
The Semiconductor Device Control Add-On Professional edition distributes the interface and protocol project templates with a unit test project that you can use to test the logic of the custom interface or protocol. Visual Studio creates the unit test project when creating a new custom interface or protocol project. The name of the unit test project is the same as the project appended with the word Test and located in the same location as the project.
Debugging a Custom Interface Project
Use the unit test project to debug a custom interface project.
Each API in the interface project has a respective test method in the unit test project. The unit test project includes the following test methods:
| Method Name | Description |
|---|---|
| TestInterfaceInstantiate() |
|
| TestInterfaceStartAndStop() |
|
| TestGetInterfaceSettings() |
|
| TestGetInterfaceDynamicSettings() |
|
| TestInterfaceUpdateAndValidateSettings() |
|
| TestInterfaceUpdateAndValidateDynamicSettings() |
|
Debugging a Custom Protocol Project
Use the SampleTest unit test project to get started debugging a custom protocol project or PXIe-657x protocol project.
- Add a reference to the parent interface into the unit test project.
- Replace the InterfaceBase class name with the name of the interface constructor throughout the unit test project wherever the interface is instantiated. Refer to code comments for more information about replacing the InterfaceBase class name.
Custom Protocol Test Methods
Each API in the protocol project has a respective test method in the unit test project. The unit test project includes the following test methods:
| Method Name | Description |
|---|---|
| TestProtocolInstantiate() |
|
| TestProtocolStartAndStop() |
|
| TestGetProtocolSettings() |
|
| TestGetProtocolDynamicSettings() |
|
| TestProtocolUpdateAndValidateSettings() |
|
| TestProtocolUpdateAndValidateDynamicSettings() |
|
| TestProtocolRegisterWrite() |
|
| TestProtocolRegisterRead() |
|