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

com.cosylab.epics.caj.cas.requests.CreateChannelRequest Maven / Gradle / Ivy

There is a newer version: 1.1.15
Show newest version
/*
 * Copyright (c) 2004 by Cosylab
 *
 * The full license specifying the redistribution, modification, usage and other
 * rights and obligations is included with the distribution of this project in
 * the file "LICENSE-CAJ". If the license is not included visit Cosylab web site,
 * .
 *
 * THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
 * IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR OF THIS SOFTWARE, ASSUMES
 * _NO_ RESPONSIBILITY FOR ANY CONSEQUENCE RESULTING FROM THE USE, MODIFICATION,
 * OR REDISTRIBUTION OF THIS SOFTWARE.
 */

package com.cosylab.epics.caj.cas.requests;

import gov.aps.jca.cas.ProcessVariable;
import gov.aps.jca.cas.ServerChannel;

import com.cosylab.epics.caj.impl.Request;
import com.cosylab.epics.caj.impl.Transport;
import com.cosylab.epics.caj.impl.requests.AbstractCARequest;

/**
 * CA create channel response.
 * @author Matej Sekoranja
 * @version $id$
 */
public class CreateChannelRequest extends AbstractCARequest {

	/**
	 * @param transport
	 */
	public CreateChannelRequest(Transport transport, ServerChannel channel) {
		super(transport);
		
		// NOTE: CA only does 1D arrays for now 
		ProcessVariable pv = channel.getProcessVariable();
		requestMessage = insertCAHeader(transport, null,
										(short)18, (short)0, 
										(short)pv.getType().getValue(), (short)pv.getDimensionSize(0),
										channel.getCID(), channel.getSID());
	}

	/**
	 * @see com.cosylab.epics.caj.impl.Request#getPriority()
	 */
	public byte getPriority() {
		return Request.SEND_IMMEDIATELY_PRIORITY;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy