Terminal Information CFR API GetDCTInfo
7526 Ethernet Flash level 4.24 and higher or base EPROM 3.12 or higher includes a new CFR API which allows the CFR programmer to have access to
7526 CFR toolkit files (CFRAPI26.H, CFRAPI26.LIB) dated 5/28/97 are required to build CFRs with this function.
Example:
/* Returns E_INTERNAL if run on a 7526 with EPROM older than 3.12 (non-Enet) */ /* or FLASH-ware older than B4.24. */ /* (sprintf_752x is from the sample CFR26LIB.LIB library) */ struct DCT_Info sDCTInfo; char buf[81]; GetDCTInfo( &sDCTInfo ); VioClear(); sprintf_752x( buf, 81, 0, 0, "I am Ethernet MAC %02X %02X %02X %02X %02X %02X", (USHORT)sDCTInfo.ucPhyAddr[0], (USHORT)sDCTInfo.ucPhyAddr[1], (USHORT)sDCTInfo.ucPhyAddr[2], (USHORT)sDCTInfo.ucPhyAddr[3], (USHORT)sDCTInfo.ucPhyAddr[4], (USHORT)sDCTInfo.ucPhyAddr[5] ); sprintf_752x( buf, 81, 1, 0, "with IP address %s", sDCTInfo.szDCTIPAddress ); IdleManager(400); /* 2 seconds delay */ VioClear(); sprintf_752x( buf, 81, 0, 0, "Talking to host %s ", sDCTInfo.szDCCIPAddress ); sprintf_752x( buf, 81, 1, 0, "%u Txns to send, %lu bytes free", sDCTInfo.usTxnsInBuffer , sDCTInfo.ulBufferEmpty ); IdleManager(400); /* 2 seconds delay */ VioClear(); sprintf_752x(buffer, 41, 0, 0, "Send to server: %s", (sDCTInfo.ucUnsolicitedOK==0)? "No":"Yes" ); IdleManager(400); /* 2 seconds delay */