2 package org.smallfoot.wwn;
4 import java.math.BigInteger;
48 else if (wwn.matches(
"20[1-4][4-7]00a0b8[0-9a-f]{6}"))
63 String res = super.toString();
64 if (null == res) res =
"";
68 BigInteger serDirPort[] =
wwn.divideAndRemainder(
new BigInteger(
"1000000",16));
70 BigInteger dirPort[] = serDirPort[0].divideAndRemainder(
new BigInteger(
"1000000",16));
80 int port = (dirPort[0].intValue() / 0x010) % 2;
81 int controller = (dirPort[0].intValue() % 2);
87 return res + String.format(
"DS3400-%06x:%c:%d",serDirPort[1].intValue(),SP,port+1);
89 return res + String.format(
"DS3400-%06x-ctrl%c-FC%d",serDirPort[1].intValue(),SP,port+1);