All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.projectfloodlight.openflow.protocol.ver15.OFOxssVer15 Maven / Gradle / Ivy

Go to download

OpenFlowJ API supporting OpenFlow versions 1.0 through 1.5.1, generated by LoxiGen

The newest version!
// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
// Copyright (c) 2011, 2012 Open Networking Foundation
// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
// This library was generated by the LoxiGen Compiler.
// See the file LICENSE.txt which should have been included in the source distribution

// Automatically generated by LOXI from template of_factory_class.java
// Do not modify

package org.projectfloodlight.openflow.protocol.ver15;

import org.projectfloodlight.openflow.protocol.*;
import org.projectfloodlight.openflow.protocol.action.*;
import org.projectfloodlight.openflow.protocol.actionid.*;
import org.projectfloodlight.openflow.protocol.bsntlv.*;
import org.projectfloodlight.openflow.protocol.errormsg.*;
import org.projectfloodlight.openflow.protocol.meterband.*;
import org.projectfloodlight.openflow.protocol.instruction.*;
import org.projectfloodlight.openflow.protocol.instructionid.*;
import org.projectfloodlight.openflow.protocol.match.*;
import org.projectfloodlight.openflow.protocol.stat.*;
import org.projectfloodlight.openflow.protocol.oxm.*;
import org.projectfloodlight.openflow.protocol.oxs.*;
import org.projectfloodlight.openflow.protocol.queueprop.*;
import org.projectfloodlight.openflow.types.*;
import org.projectfloodlight.openflow.util.*;
import org.projectfloodlight.openflow.exceptions.*;


public class OFOxssVer15 implements OFOxss {
    public final static OFOxssVer15 INSTANCE = new OFOxssVer15();




    public OFOxsByteCount.Builder buildByteCount() {
        return new OFOxsByteCountVer15.Builder();
    }
    public OFOxsByteCount byteCount(U64 value) {
        return new OFOxsByteCountVer15(
                value
                    );
    }

    public OFOxsDuration.Builder buildDuration() {
        return new OFOxsDurationVer15.Builder();
    }
    public OFOxsDuration duration(U64 value) {
        return new OFOxsDurationVer15(
                value
                    );
    }

    public OFOxsFlowCount.Builder buildFlowCount() {
        return new OFOxsFlowCountVer15.Builder();
    }
    public OFOxsFlowCount flowCount(U32 value) {
        return new OFOxsFlowCountVer15(
                value
                    );
    }

    public OFOxsIdleTime.Builder buildIdleTime() {
        return new OFOxsIdleTimeVer15.Builder();
    }
    public OFOxsIdleTime idleTime(U64 value) {
        return new OFOxsIdleTimeVer15(
                value
                    );
    }

    public OFOxsPacketCount.Builder buildPacketCount() {
        return new OFOxsPacketCountVer15.Builder();
    }
    public OFOxsPacketCount packetCount(U64 value) {
        return new OFOxsPacketCountVer15(
                value
                    );
    }

    public OFMessageReader> getReader() {
        return OFOxsVer15.READER;
    }

    @SuppressWarnings("unchecked")
    public > OFOxs fromValue(F value, StatField field) {
        switch (field.id) {
            case BYTE_COUNT:
                return (OFOxs)((Object)byteCount((U64)((Object)value)));
            case DURATION:
                return (OFOxs)((Object)duration((U64)((Object)value)));
            case FLOW_COUNT:
                return (OFOxs)((Object)flowCount((U32)((Object)value)));
            case IDLE_TIME:
                return (OFOxs)((Object)idleTime((U64)((Object)value)));
            case PACKET_COUNT:
                return (OFOxs)((Object)packetCount((U64)((Object)value)));
            default:
                throw new IllegalArgumentException("No OXM known for match field " + field);
        }
    }


    public OFVersion getVersion() {
            return OFVersion.OF_15;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy