jmri
Interface Consist

All Known Implementing Classes:
DccConsist, EasyDccConsist, XNetConsist

public interface Consist

Interface for a Consist Object, describing one or more cooperatively-operating locomotives.


This file is part of JMRI.

JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.

JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Author:
Paul Bender Copyright (C) 2003-2008

Field Summary
static int ADVANCED_CONSIST
           
static int CS_CONSIST
           
static int POSITION_LEAD
           
static int POSITION_TRAIL
           
 
Method Summary
 void add(DccLocoAddress LocoAddress, boolean directionNormal)
           
 void addConsistListener(ConsistListener Listener)
           
 boolean contains(DccLocoAddress address)
           
 void dispose()
           
 DccLocoAddress getConsistAddress()
           
 String getConsistID()
           
 ArrayList getConsistList()
           
 int getConsistType()
           
 boolean getLocoDirection(DccLocoAddress address)
           
 int getPosition(DccLocoAddress address)
           
 boolean isAddressAllowed(DccLocoAddress address)
           
 void remove(DccLocoAddress LocoAddress)
           
 void removeConsistListener(ConsistListener Listener)
           
 void restore(DccLocoAddress LocoAddress, boolean directionNormal)
           
 void setConsistID(String ID)
           
 void setConsistType(int consist_type)
           
 void setPosition(DccLocoAddress address, int position)
           
 int sizeLimit()
          is there a size limit for this type of consist?
 

Field Detail

ADVANCED_CONSIST

static final int ADVANCED_CONSIST
See Also:
Constant Field Values

CS_CONSIST

static final int CS_CONSIST
See Also:
Constant Field Values

POSITION_LEAD

static final int POSITION_LEAD
See Also:
Constant Field Values

POSITION_TRAIL

static final int POSITION_TRAIL
See Also:
Constant Field Values
Method Detail

dispose

void dispose()

setConsistType

void setConsistType(int consist_type)

getConsistType

int getConsistType()

getConsistAddress

DccLocoAddress getConsistAddress()

isAddressAllowed

boolean isAddressAllowed(DccLocoAddress address)

sizeLimit

int sizeLimit()
is there a size limit for this type of consist? returns -1 if no limit returns 0 if the Consist Type is not supported returns the total number of useable spaces if the consist has a limit (do not subtract used spaces).


getConsistList

ArrayList getConsistList()

contains

boolean contains(DccLocoAddress address)

getLocoDirection

boolean getLocoDirection(DccLocoAddress address)

add

void add(DccLocoAddress LocoAddress,
         boolean directionNormal)

restore

void restore(DccLocoAddress LocoAddress,
             boolean directionNormal)

remove

void remove(DccLocoAddress LocoAddress)

setPosition

void setPosition(DccLocoAddress address,
                 int position)

getPosition

int getPosition(DccLocoAddress address)

addConsistListener

void addConsistListener(ConsistListener Listener)

removeConsistListener

void removeConsistListener(ConsistListener Listener)

setConsistID

void setConsistID(String ID)

getConsistID

String getConsistID()


Copyright © 1997 - 2008 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: SourceForge_Logo