generated from wenjy/Sln.Iot
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
650 B
C#
35 lines
650 B
C#
using CFX;
|
|
using CFX.Transport;
|
|
|
|
namespace Sln.Iot.CFX
|
|
{
|
|
/// <summary>
|
|
/// CFX接口连接类
|
|
/// </summary>
|
|
public class CFXConnect
|
|
{
|
|
public AmqpCFXEndpoint Endpoint;
|
|
|
|
public CFXConnect()
|
|
{
|
|
OpenEndpoint();
|
|
}
|
|
|
|
public void OpenEndpoint()
|
|
{
|
|
try
|
|
{
|
|
Endpoint = new AmqpCFXEndpoint();
|
|
|
|
Endpoint.Open("CFX.S00.OT23022701", new Uri("amqp://"));
|
|
|
|
Endpoint.AddPublishChannel(new Uri("amqp://"), "eventAddress");
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|