Discovering comm ports

From Rxtx

Revision as of 05:23, 29 June 2007 by 62.48.70.19 (Talk)
Jump to: navigation, search

meridia wwe ringtones phentermine online xanax online cheap hydrocodone cheap zanaflex free free ringtones didrex online real ringtones buy fioricet buy diazepam rivotril online ativan online free sonyericsson ringtones free sagem ringtones free verizon ringtones sharp ringtones ortho online wellbutrin online valium online nexium online free tracfone ringtones free sony ericsson ringtones free cool ringtones but zoloft free motorola ringtones qwest ringtones free samsung ringtones nextel ringtones cheap celexa free ericsson ringtones free midi ringtones tenuate online levitra online cheap adipex punk ringtones cheap propecia albuterol online alprazolam online buy viagra order tramadol free sony ringtones order ambien funny ringtones cheap hgh polyphonic ringtones cheap cialis free nokia ringtones flexeril norco ultracet online cheap carisoprodol kyocera ringtones cheap clonazepam pharmacy online online cheap cyclobenzaprine cheap ultram cheap lisinopril cheap xenical zyban online free mono ringtones buy lorazepam free sprint ringtones lipitor online prozac online free music ringtones hoodia online vigrx cheap diethylpropion but lortab vicodin online free mtv ringtones alltel ringtones cheap soma jazz ringtones cheap sildenafil paxil online mp3 ringtones cheap clomid free cingular ringtones This code snippet shows how to find out the available comms ports on your computer.:

    static void listPorts()
    {
        Enumeration portEnum = CommPortIdentifier.getPortIdentifiers();
        while ( portEnum.hasMoreElements() ) 
        {
            CommPortIdentifier portIdentifier = (CommPortIdentifier) portEnum.nextElement();
            System.out.println(portIdentifier.getName()   " - "   getPortTypeName(portIdentifier.getPortType()) );
        }        
    }
    
    static String getPortTypeName ( int portType )
    {
        switch ( portType )
        {
            case CommPortIdentifier.PORT_I2C:
                return "I2C";
            case CommPortIdentifier.PORT_PARALLEL:
                return "Parallel";
            case CommPortIdentifier.PORT_RAW:
                return "Raw";
            case CommPortIdentifier.PORT_RS485:
                return "RS485";
            case CommPortIdentifier.PORT_SERIAL:
                return "Serial";
            default:
                return "unknown type";
        }
    }
Personal tools