发表于:2003-05-21 15:08:00
10楼
// LDI Select Functions
//
// This file was automatically generated with L-Chip Wizard 3.1
//
#include <LdiAPI.h>
#include <LcWiz.h>
#include <string.h>
void LdiSelectConfig(
uint32 LdiTransceiver,
uint32 LdiActivePort,
LdiConfig_t *LdiConfig
)
{
uint32 i;
uint8 PortMap[] = {0,1,2};
LdiConfig->SelectTransceiver = PortMap[LdiActivePort];
LdiConfig->RandomValue = 0xAAAA;
LdiConfig->STITimer = 0;
LdiConfig->MaxTriesXMT = 7;
LdiConfig->PacketCycleTimer = 0;
LdiConfig->InterruptLimit = 0;
LdiConfig->STIModeEnable = 0;
LdiConfig->TransceiverModePort2 = 1;
LdiConfig->TransceiverModePort1 = 1;
LdiConfig->TransceiverModePort0 = 4;
LdiConfig->DiffRCVHysteresis = 0;
LdiConfig->DMInternalCollDetEnable = 0;
LdiConfig->RetransmitEnable = 1;
LdiConfig->ExternalCollDetEnable = 0;
LdiConfig->STIExtCollDetEnable = 0;
LdiConfig->InternalCollDetEnable = 0;
LdiConfig->BitSyncThreshold = 0;
LdiConfig->PreambleLength = 1;
LdiConfig->ClockInToOutRatio = 1;
LdiConfig->BitRate = 13;
LdiConfig->InterFrameSpace = 3;
LdiConfig->ChannelPriority = 3;
LdiConfig->NodePriority = 3;
LdiConfig->Slot = 4;
LdiConfig->DiffManEncoderEnable = 1;
LdiConfig->DiffManDecoderEnable = 1;
LdiConfig->PreambleCollDetEnable = 1;
LdiConfig->AbortPreambleEnable = 1;
LdiConfig->FilterMode = 0x00000000;
LdiConfig->NodeLedMode = 0x00000000;
LdiConfig->CommPortDir = 0x000007FF;
LdiConfig->CommPortOut = 0x00000000;
LdiConfig->SpromBits = 0x00000078;
LdiConfig->InternalRamSize = 0;
LdiConfig->BufferSizeREF = 92;
LdiConfig->BufferSizeRCV = 16292;
LdiConfig->BufferSizeXMTP = 8192;
LdiConfig->BufferSizeXMTN = 8191;
LdiConfig->TransceiverDelay = 0;
LdiConfig->InternalTransmitLoop = 0;
LdiConfig->Trigger = 0;
LdiConfig->ClockOutEnable = 0;
LdiConfig->RandomOnly = 1;
LdiConfig->Layer3AccelerationOff = 0;
LdiConfig->FreeBufferToXMTP = 0;
LdiConfig->FreeBufferToXMTN = 0;
LdiConfig->STIConfig[0] = 0x0;
LdiConfig->STIConfig[1] = 0x0;
LdiConfig->STIConfig[2] = 0x0;
LdiConfig->STIConfig[3] = 0x0;
LdiConfig->STIConfig[4] = 0x0;
LdiConfig->STIConfig[5] = 0x0;
LdiConfig->STIConfig[6] = 0x0;
for(i=0;i<16;i++) LdiConfig->Reserved[i] = 0x00;
switch (LdiTransceiver)
{
case 2: //RS-485-0.3
LdiConfig->PacketCycleTimer = 1335;
LdiConfig->PreambleLength = 5;
LdiConfig->InterFrameSpace = 73;
LdiConfig->ChannelPriority = 100;
LdiConfig->Slot = 25;
break;
case 3: //RS-485-0.6
LdiConfig->PacketCycleTimer = 668;
LdiConfig->PreambleLength = 5;
LdiConfig->BitRate = 12;
LdiConfig->InterFrameSpace = 73;
LdiConfig->ChannelPriority = 100;
LdiConfig->Slot = 25;
break;
case 4: //RS-485-1.2
LdiConfig->PacketCycleTimer = 334;
LdiConfig->PreambleLength = 5;
LdiConfig->BitRate = 11;
LdiConfig->InterFrameSpace = 73;
LdiConfig->ChannelPriority = 100;
LdiConfig->Slot = 25;
break;
case 5: //RS-485-2.4
LdiConfig->PacketCycleTimer = 167;
LdiConfig->PreambleLength = 5;
LdiConfig->BitRate = 10;
LdiConfig->InterFrameSpace = 73;
LdiConfig->ChannelPriority = 100;
LdiConfig->Slot = 25;
break;
case 6: //RS-485-4.9
LdiConfig->PacketCycleTimer = 84;
LdiConfig->PreambleLength = 5;
LdiConfig->BitRate = 9;
LdiConfig->InterFrameSpace = 73;
LdiConfig->ChannelPriority = 100;
LdiConfig->Slot = 25;
break;
case 7: //RS-485-9.8
LdiConfig->PacketCycleTimer = 44;
LdiConfig->PreambleLength = 5;
LdiConfig->BitRate = 8;
LdiConfig->InterFrameSpace = 87;
LdiConfig->ChannelPriority = 108;
LdiConfig->Slot = 27;
break;
case 8: //RS-485-19.5
LdiConfig->PacketCycleTimer = 25;
LdiConfig->PreambleLength = 5;
LdiConfig->BitRate = 7;
LdiConfig->InterFrameSpace = 141;
LdiConfig->ChannelPriority = 120;
LdiConfig->Slot = 30;
break;
case 9: //RS-485-39.1
LdiConfig->PacketCycleTimer = 12;
LdiConfig->PreambleLength = 8;
LdiConfig->BitRate = 6;
LdiConfig->InterFrameSpace = 249;
LdiConfig->ChannelPriority = 120;
LdiConfig->Slot = 30;
break;
case 10: //RS-485-78.1
LdiConfig->PacketCycleTimer = 10;
LdiConfig->PreambleLength = 19;
LdiConfig->BitRate = 5;
LdiConfig->InterFrameSpace = 481;
LdiConfig->ChannelPriority = 180;
LdiConfig->Slot = 45;
break;
case 11: //RS-485-156.3
LdiConfig->PacketCycleTimer = 10;
LdiConfig->PreambleLength = 41;
LdiConfig->BitRate = 4;
LdiConfig->InterFrameSpace = 930;
LdiConfig->ChannelPriority = 240;
LdiConfig->Slot = 60;
break;
case 12: //RS-485-312.5
LdiConfig->PacketCycleTimer = 10;
LdiConfig->PreambleLength = 83;
LdiConfig->BitRate = 3;
LdiConfig->InterFrameSpace = 1858;
LdiConfig->ChannelPriority = 480;
LdiConfig->Slot = 120;
break;
case 13: //RS-485-625
LdiConfig->PacketCycleTimer = 10;
LdiConfig->PreambleLength = 178;
LdiConfig->BitRate = 2;
LdiConfig->InterFrameSpace = 3714;
LdiConfig->ChannelPriority = 960;
LdiConfig->Slot = 240;
break;
case 14: //RS-485-1250
LdiConfig->PacketCycleTimer = 10;
LdiConfig->PreambleLength = 188;
LdiConfig->BitRate = 1;
LdiConfig->InterFrameSpace = 3740;
LdiConfig->ChannelPriority = 960;
LdiConfig->Slot = 240;
break;
case 15: //RS-485-2500
LdiConfig->PacketCycleTimer = 5;
LdiConfig->PreambleLength = 188;
LdiConfig->BitRate = 0;
LdiConfig->InterFrameSpace = 3740;
LdiConfig->ChannelPriority = 960;
LdiConfig->Slot = 240;
break;
case 114: //XF-1250
LdiConfig->PacketCycleTimer = 10;
LdiConfig->TransceiverModePort0 = 5;
LdiConfig->PreambleLength = 188;
LdiConfig->BitRate = 1;
LdiConfig->InterFrameSpace = 3740;
LdiConfig->ChannelPriority = 3840;
LdiConfig->Slot = 240;
break;
case 115: //XF-2500
LdiConfig->PacketCycleTimer = 5;
LdiConfig->TransceiverModePort0 = 5;
LdiConfig->PreambleLength = 188;
LdiConfig->BitRate = 0;
LdiConfig->InterFrameSpace = 3740;
LdiConfig->ChannelPriority = 3840;
LdiConfig->Slot = 240;
break;
case 201: //FT-10
LdiConfig->PacketCycleTimer = 10;
LdiConfig->PreambleLength = 22;
LdiConfig->BitRate = 6;
LdiConfig->InterFrameSpace = 270;
LdiConfig->ChannelPriority = 208;
LdiConfig->Slot = 52;
LdiConfig->TransceiverDelay = 2;
LdiConfig->InternalTransmitLoop = 1;
LdiConfig->ClockOutEnable = 1;
break;
case 1001: //PLT-21A
LdiConfig->STITimer = 63;
LdiConfig->PacketCycleTimer = 155;
LdiConfig->STIModeEnable = 1;
LdiConfig->TransceiverModePort0 = 6;
LdiConfig->STIExtCollDetEnable = 1;
LdiConfig->BitRate = 4;
LdiConfig->InterFrameSpace = 4249;
LdiConfig->ChannelPriority = 20000;
LdiConfig->Slot = 2500;
LdiConfig->DiffManEncoderEnable = 0;
LdiConfig->DiffManDecoderEnable = 0;
LdiConfig->STIConfig[0] = 0x4A;
break;
case 1101: //PL-20C-156
LdiConfig->STITimer = 63;
LdiConfig->PacketCycleTimer = 155;
LdiConfig->STIModeEnable = 1;
LdiConfig->TransceiverModePort0 = 6;
LdiConfig->STIExtCollDetEnable = 1;
LdiConfig->BitRate = 4;
LdiConfig->InterFrameSpace = 4249;
LdiConfig->ChannelPriority = 20000;
LdiConfig->Slot = 2500;
LdiConfig->DiffManEncoderEnable = 0;
LdiConfig->DiffManDecoderEnable = 0;
LdiConfig->STIConfig[0] = 0x4A;
LdiConfig->STIConfig[3] = 0x10;
break;
case 1102: //PL-20N-156
LdiConfig->STITimer = 63;
LdiConfig->PacketCycleTimer = 155;
LdiConfig->STIModeEnable = 1;
LdiConfig->TransceiverModePort0 = 6;
LdiConfig->STIExtCollDetEnable = 1;
LdiConfig->BitRate = 4;
LdiConfig->InterFrameSpace = 4249;
LdiConfig->ChannelPriority = 20000;
LdiConfig->Slot = 2500;
LdiConfig->DiffManEncoderEnable = 0;
LdiConfig->DiffManDecoderEnable = 0;
LdiConfig->STIConfig[0] = 0xE;
LdiConfig->STIConfig[1] = 0x1;
LdiConfig->STIConfig[3] = 0x10;
break;
case 1103: //PL-20C-LOW-156
LdiConfig->STITimer = 63;
LdiConfig->PacketCycleTimer = 155;
LdiConfig->STIModeEnable = 1;
LdiConfig->TransceiverModePort0 = 6;
LdiConfig->STIExtCollDetEnable = 1;
LdiConfig->BitRate = 4;
LdiConfig->InterFrameSpace = 4249;
LdiConfig->ChannelPriority = 20000;
LdiConfig->Slot = 2500;
LdiConfig->DiffManEncoderEnable = 0;
LdiConfig->DiffManDecoderEnable = 0;
LdiConfig->STIConfig[0] = 0x4A;
LdiConfig->STIConfig[3] = 0x12;
break;
case 1104: //PL-20N-LOW-156
LdiConfig->STITimer = 63;
LdiConfig->PacketCycleTimer = 155;
LdiConfig->STIModeEnable = 1;
LdiConfig->TransceiverModePort0 = 6;
LdiConfig->STIExtCollDetEnable = 1;
LdiConfig->BitRate = 4;
LdiConfig->InterFrameSpace = 4249;
LdiConfig->ChannelPriority = 20000;
LdiConfig->Slot = 2500;
LdiConfig->DiffManEncoderEnable = 0;
LdiConfig->DiffManDecoderEnable = 0;
LdiConfig->STIConfig[0] = 0xE;
LdiConfig->STIConfig[1] = 0x1;
LdiConfig->STIConfig[3] = 0x12;
break;
case 1105: //PL-20C-1250
LdiConfig->STITimer = 63;
LdiConfig->PacketCycleTimer = 155;
LdiConfig->STIModeEnable = 1;
LdiConfig->TransceiverModePort0 = 6;
LdiConfig->STIExtCollDetEnable = 1;
LdiConfig->BitRate = 1;
LdiConfig->InterFrameSpace = 33999;
LdiConfig->ChannelPriority = 160000;
LdiConfig->Slot = 20000;
LdiConfig->DiffManEncoderEnable = 0;
LdiConfig->DiffManDecoderEnable = 0;
LdiConfig->STIConfig[0] = 0x4A;
LdiConfig->STIConfig[3] = 0x10;
break;
case 1106: //PL-20N-1250
LdiConfig->STITimer = 63;
LdiConfig->PacketCycleTimer = 155;
LdiConfig->STIModeEnable = 1;
LdiConfig->TransceiverModePort0 = 6;
LdiConfig->STIExtCollDetEnable = 1;
LdiConfig->BitRate = 1;
LdiConfig->InterFrameSpace = 33999;
LdiConfig->ChannelPriority = 160000;
LdiConfig->Slot = 20000;
LdiConfig->DiffManEncoderEnable = 0;
LdiConfig->DiffManDecoderEnable = 0;
LdiConfig->STIConfig[0] = 0xE;
LdiConfig->STIConfig[1] = 0x1;
LdiConfig->STIConfig[3] = 0x10;
break;
case 1107: //PL-20C-LOW-1250
LdiConfig->STITimer = 63;
LdiConfig->PacketCycleTimer = 155;
LdiConfig->STIModeEnable = 1;
LdiConfig->TransceiverModePort0 = 6;
LdiConfig->STIExtCollDetEnable = 1;
LdiConfig->BitRate = 1;
LdiConfig->InterFrameSpace = 33999;
LdiConfig->ChannelPriority = 160000;
LdiConfig->Slot = 20000;
LdiConfig->DiffManEncoderEnable = 0;
LdiConfig->DiffManDecoderEnable = 0;
LdiConfig->STIConfig[0] = 0x4A;
LdiConfig->STIConfig[3] = 0x12;
break;
case 1108: //PL-20N-LOW-1250
LdiConfig->STITimer = 63;
LdiConfig->PacketCycleTimer = 155;
LdiConfig->STIModeEnable = 1;
LdiConfig->TransceiverModePort0 = 6;
LdiConfig->STIExtCollDetEnable = 1;
LdiConfig->BitRate = 1;
LdiConfig->InterFrameSpace = 33999;
LdiConfig->ChannelPriority = 160000;
LdiConfig->Slot = 20000;
LdiConfig->DiffManEncoderEnable = 0;
LdiConfig->DiffManDecoderEnable = 0;
LdiConfig->STIConfig[0] = 0xE;
LdiConfig->STIConfig[1] = 0x1;
LdiConfig->STIConfig[3] = 0x12;
break;
}
}
void LdiSelectRefData(
uint8 LdiRefData[LDI_REF_DATA_SIZE]
)
{
uint32 i;
for(i=1;i<LDI_REF_DATA_SIZE;i++) LdiRefData[i] = 0;
LdiRefData[0x04] = 0x80;
LdiRefData[0x05] = 0x80;
LdiRefData[0x06] = 0x80;
LdiRefData[0x07] = 0x80;
LdiRefData[0x0E] = 0x80;
LdiRefData[0x15] = 0x80;
}
void LdiSelectSetupInfo(
uint32 LdiTransceiver,
LdiSetupInfo_t *LdiSetupInfo
)
{
strcpy(LdiSetupInfo->TransceiverName,"<not selected>");
strcpy(LdiSetupInfo->Comment,"Please Select a Transceiver");
strcpy(LdiSetupInfo->HardwareName,"LC7093 20MHz");
strcpy(LdiSetupInfo->FirmwareName,"LC7093-120A");
LdiSetupInfo->MustBeConfigured = 0;
LdiSetupInfo->ReadBackCapability = 1;
LdiSetupInfo->ClockRate = 20000000;
LdiSetupInfo->TimeStampResolution = 20000000;
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 1;
LdiSetupInfo->AvailableOnPort[2] = 1;
LdiSetupInfo->AutoDetect = 0;
LdiSetupInfo->TransceiverId = 0x0;
LdiSetupInfo->RamSize = 32768;
LdiSetupInfo->InternalRamSize = 2048;
LdiSetupInfo->MeanIdleBits = 0;
LdiSetupInfo->HardwareType = 0xFF;
LdiSetupInfo->Version = 0xFF;
LdiSetupInfo->ChannelBitRate = 0;
LdiSetupInfo->BitRate = 305;
LdiSetupInfo->NextTransceiver = 2;
switch (LdiTransceiver)
{
case 2: //RS-485-0.3
strcpy(LdiSetupInfo->TransceiverName,"RS-485-0.3");
strcpy(LdiSetupInfo->Comment,"RS-485-0.3 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 1;
LdiSetupInfo->AutoDetect = 1;
LdiSetupInfo->MeanIdleBits = 47;
LdiSetupInfo->ChannelBitRate = 305;
LdiSetupInfo->NextTransceiver = 3;
break;
case 3: //RS-485-0.6
strcpy(LdiSetupInfo->TransceiverName,"RS-485-0.6");
strcpy(LdiSetupInfo->Comment,"RS-485-0.6 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 1;
LdiSetupInfo->AutoDetect = 1;
LdiSetupInfo->MeanIdleBits = 47;
LdiSetupInfo->ChannelBitRate = 610;
LdiSetupInfo->BitRate = 610;
LdiSetupInfo->NextTransceiver = 4;
break;
case 4: //RS-485-1.2
strcpy(LdiSetupInfo->TransceiverName,"RS-485-1.2");
strcpy(LdiSetupInfo->Comment,"RS-485-1.2 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 1;
LdiSetupInfo->AutoDetect = 1;
LdiSetupInfo->MeanIdleBits = 47;
LdiSetupInfo->ChannelBitRate = 1221;
LdiSetupInfo->BitRate = 1221;
LdiSetupInfo->NextTransceiver = 5;
break;
case 5: //RS-485-2.4
strcpy(LdiSetupInfo->TransceiverName,"RS-485-2.4");
strcpy(LdiSetupInfo->Comment,"RS-485-2.4 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 1;
LdiSetupInfo->AutoDetect = 1;
LdiSetupInfo->MeanIdleBits = 47;
LdiSetupInfo->ChannelBitRate = 2441;
LdiSetupInfo->BitRate = 2441;
LdiSetupInfo->NextTransceiver = 6;
break;
case 6: //RS-485-4.9
strcpy(LdiSetupInfo->TransceiverName,"RS-485-4.9");
strcpy(LdiSetupInfo->Comment,"RS-485-4.9 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 1;
LdiSetupInfo->AutoDetect = 1;
LdiSetupInfo->MeanIdleBits = 47;
LdiSetupInfo->ChannelBitRate = 4883;
LdiSetupInfo->BitRate = 4883;
LdiSetupInfo->NextTransceiver = 7;
break;
case 7: //RS-485-9.8
strcpy(LdiSetupInfo->TransceiverName,"RS-485-9.8");
strcpy(LdiSetupInfo->Comment,"RS-485-9.8 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 1;
LdiSetupInfo->AutoDetect = 1;
LdiSetupInfo->MeanIdleBits = 51;
LdiSetupInfo->ChannelBitRate = 9766;
LdiSetupInfo->BitRate = 9766;
LdiSetupInfo->NextTransceiver = 8;
break;
case 8: //RS-485-19.5
strcpy(LdiSetupInfo->TransceiverName,"RS-485-19.5");
strcpy(LdiSetupInfo->Comment,"RS-485-19.5 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 1;
LdiSetupInfo->AutoDetect = 1;
LdiSetupInfo->MeanIdleBits = 63;
LdiSetupInfo->ChannelBitRate = 19531;
LdiSetupInfo->BitRate = 19531;
LdiSetupInfo->NextTransceiver = 9;
break;
case 9: //RS-485-39.1
strcpy(LdiSetupInfo->TransceiverName,"RS-485-39.1");
strcpy(LdiSetupInfo->Comment,"RS-485-39.1 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 1;
LdiSetupInfo->AutoDetect = 1;
LdiSetupInfo->MeanIdleBits = 76;
LdiSetupInfo->ChannelBitRate = 39063;
LdiSetupInfo->BitRate = 39063;
LdiSetupInfo->NextTransceiver = 10;
break;
case 10: //RS-485-78.1
strcpy(LdiSetupInfo->TransceiverName,"RS-485-78.1");
strcpy(LdiSetupInfo->Comment,"RS-485-78.1 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 1;
LdiSetupInfo->AutoDetect = 1;
LdiSetupInfo->MeanIdleBits = 128;
LdiSetupInfo->ChannelBitRate = 78125;
LdiSetupInfo->BitRate = 78125;
LdiSetupInfo->NextTransceiver = 11;
break;
case 11: //RS-485-156.3
strcpy(LdiSetupInfo->TransceiverName,"RS-485-156.3");
strcpy(LdiSetupInfo->Comment,"RS-485-156.3 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 1;
LdiSetupInfo->AutoDetect = 1;
LdiSetupInfo->MeanIdleBits = 206;
LdiSetupInfo->ChannelBitRate = 156250;
LdiSetupInfo->BitRate = 156250;
LdiSetupInfo->NextTransceiver = 12;
break;
case 12: //RS-485-312.5
strcpy(LdiSetupInfo->TransceiverName,"RS-485-312.5");
strcpy(LdiSetupInfo->Comment,"RS-485-312.5 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 1;
LdiSetupInfo->AutoDetect = 1;
LdiSetupInfo->MeanIdleBits = 412;
LdiSetupInfo->ChannelBitRate = 312500;
LdiSetupInfo->BitRate = 312500;
LdiSetupInfo->NextTransceiver = 13;
break;
case 13: //RS-485-625
strcpy(LdiSetupInfo->TransceiverName,"RS-485-625");
strcpy(LdiSetupInfo->Comment,"RS-485-625 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 1;
LdiSetupInfo->AutoDetect = 1;
LdiSetupInfo->MeanIdleBits = 824;
LdiSetupInfo->ChannelBitRate = 625000;
LdiSetupInfo->BitRate = 625000;
LdiSetupInfo->NextTransceiver = 14;
break;
case 14: //RS-485-1250
strcpy(LdiSetupInfo->TransceiverName,"RS-485-1250");
strcpy(LdiSetupInfo->Comment,"RS-485-1250 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 1;
LdiSetupInfo->AutoDetect = 1;
LdiSetupInfo->MeanIdleBits = 828;
LdiSetupInfo->ChannelBitRate = 1250000;
LdiSetupInfo->BitRate = 1250000;
LdiSetupInfo->NextTransceiver = 15;
break;
case 15: //RS-485-2500
strcpy(LdiSetupInfo->TransceiverName,"RS-485-2500");
strcpy(LdiSetupInfo->Comment,"RS-485-2500 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 1;
LdiSetupInfo->AutoDetect = 1;
LdiSetupInfo->MeanIdleBits = 828;
LdiSetupInfo->ChannelBitRate = 2500000;
LdiSetupInfo->BitRate = 2500000;
LdiSetupInfo->NextTransceiver = 114;
break;
case 114: //XF-1250
strcpy(LdiSetupInfo->TransceiverName,"XF-1250");
strcpy(LdiSetupInfo->Comment,"XF-1250 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 0;
LdiSetupInfo->MeanIdleBits = 1188;
LdiSetupInfo->ChannelBitRate = 1250000;
LdiSetupInfo->BitRate = 1250000;
LdiSetupInfo->NextTransceiver = 115;
break;
case 115: //XF-2500
strcpy(LdiSetupInfo->TransceiverName,"XF-2500");
strcpy(LdiSetupInfo->Comment,"XF-2500 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 0;
LdiSetupInfo->MeanIdleBits = 1188;
LdiSetupInfo->ChannelBitRate = 2500000;
LdiSetupInfo->BitRate = 2500000;
LdiSetupInfo->NextTransceiver = 201;
break;
case 201: //FT-10
strcpy(LdiSetupInfo->TransceiverName,"FT-10");
strcpy(LdiSetupInfo->Comment,"Free Topology Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 0;
LdiSetupInfo->AvailableOnPort[1] = 1;
LdiSetupInfo->AvailableOnPort[2] = 0;
LdiSetupInfo->MeanIdleBits = 225;
LdiSetupInfo->ChannelBitRate = 78125;
LdiSetupInfo->BitRate = 39063;
LdiSetupInfo->NextTransceiver = 1001;
break;
case 1001: //PLT-21A
strcpy(LdiSetupInfo->TransceiverName,"PLT-21A");
strcpy(LdiSetupInfo->Comment,"PLT-21 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 0;
LdiSetupInfo->MeanIdleBits = 183;
LdiSetupInfo->ChannelBitRate = 3987;
LdiSetupInfo->BitRate = 156250;
LdiSetupInfo->NextTransceiver = 1101;
break;
case 1101: //PL-20C-156
strcpy(LdiSetupInfo->TransceiverName,"PL-20C-156");
strcpy(LdiSetupInfo->Comment,"PLT-22 Transceiver (CENELEC)");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 0;
LdiSetupInfo->MeanIdleBits = 183;
LdiSetupInfo->ChannelBitRate = 3987;
LdiSetupInfo->BitRate = 156250;
LdiSetupInfo->NextTransceiver = 1102;
break;
case 1102: //PL-20N-156
strcpy(LdiSetupInfo->TransceiverName,"PL-20N-156");
strcpy(LdiSetupInfo->Comment,"PLT-22 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 0;
LdiSetupInfo->MeanIdleBits = 183;
LdiSetupInfo->ChannelBitRate = 3987;
LdiSetupInfo->BitRate = 156250;
LdiSetupInfo->NextTransceiver = 1103;
break;
case 1103: //PL-20C-LOW-156
strcpy(LdiSetupInfo->TransceiverName,"PL-20C-LOW-156");
strcpy(LdiSetupInfo->Comment,"PLT-22 Transceiver (CENELEC, POWMGMT)");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 0;
LdiSetupInfo->MeanIdleBits = 183;
LdiSetupInfo->ChannelBitRate = 3987;
LdiSetupInfo->BitRate = 156250;
LdiSetupInfo->NextTransceiver = 1104;
break;
case 1104: //PL-20N-LOW-156
strcpy(LdiSetupInfo->TransceiverName,"PL-20N-LOW-156");
strcpy(LdiSetupInfo->Comment,"PLT-22 Transceiver (POWMGMT)");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 0;
LdiSetupInfo->MeanIdleBits = 183;
LdiSetupInfo->ChannelBitRate = 3987;
LdiSetupInfo->BitRate = 156250;
LdiSetupInfo->NextTransceiver = 1105;
break;
case 1105: //PL-20C-1250
strcpy(LdiSetupInfo->TransceiverName,"PL-20C-1250");
strcpy(LdiSetupInfo->Comment,"PLT-22 Transceiver (CENELEC)");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 0;
LdiSetupInfo->MeanIdleBits = 183;
LdiSetupInfo->ChannelBitRate = 3987;
LdiSetupInfo->BitRate = 1250000;
LdiSetupInfo->NextTransceiver = 1106;
break;
case 1106: //PL-20N-1250
strcpy(LdiSetupInfo->TransceiverName,"PL-20N-1250");
strcpy(LdiSetupInfo->Comment,"PLT-22 Transceiver");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 0;
LdiSetupInfo->MeanIdleBits = 183;
LdiSetupInfo->ChannelBitRate = 3987;
LdiSetupInfo->BitRate = 1250000;
LdiSetupInfo->NextTransceiver = 1107;
break;
case 1107: //PL-20C-LOW-1250
strcpy(LdiSetupInfo->TransceiverName,"PL-20C-LOW-1250");
strcpy(LdiSetupInfo->Comment,"PLT-22 Transceiver (CENELEC, POWMGMT)");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 0;
LdiSetupInfo->MeanIdleBits = 183;
LdiSetupInfo->ChannelBitRate = 3987;
LdiSetupInfo->BitRate = 1250000;
LdiSetupInfo->NextTransceiver = 1108;
break;
case 1108: //PL-20N-LOW-1250
strcpy(LdiSetupInfo->TransceiverName,"PL-20N-LOW-1250");
strcpy(LdiSetupInfo->Comment,"PLT-22 Transceiver (POWMGMT)");
LdiSetupInfo->AvailableOnPort[0] = 1;
LdiSetupInfo->AvailableOnPort[1] = 0;
LdiSetupInfo->AvailableOnPort[2] = 0;
LdiSetupInfo->MeanIdleBits = 183;
LdiSetupInfo->ChannelBitRate = 3987;
LdiSetupInfo->BitRate = 1250000;
LdiSetupInfo->NextTransceiver = 0;
break;
}
}
你问的是L-Chip开发了。看看开发指南吧。呵呵!
按照EIA709.1协议,LonWorks网络管理(报文)能力都是一致的,只是最终提供给网络管理使用者(开发者)的方法不同而已。