1. A method for transmitting data by a first device, the method comprising:receiving, from a second device, sidelink scheduling information for the second device;
determining a received power for a demodulation reference signal (DMRS) associated with a physical sidelink shared channel (PSSCH) based on the sidelink scheduling information, wherein the received power for the DMRS is measured in a plurality of candidate resources for sidelink transmission;
determining a resource for sidelink transmission among the plurality of candidate resources; and
transmitting data using the determined resource,
wherein a first resource in a first subframe among the plurality of candidate resources is excluded for sidelink transmission in case that the first device has not monitored a second subframe, and the first subframe is determined based on the second subframe and a resource reservation period, and
wherein a second resource among the plurality of candidate resources is excluded for sidelink transmission in case that a received power for a DMRS of the second resource is higher than a threshold.